@@ -23,7 +23,18 @@ 'use strict' | ||
| if (stats && stats.isSymbolicLink()) { | ||
| const [srcStat, dstStat] = await Promise.all([ | ||
| fs.stat(srcpath), | ||
| fs.stat(dstpath) | ||
| ]) | ||
| // When srcpath is relative, resolve it relative to dstpath's directory | ||
| // (standard symlink behavior) or fall back to cwd if that doesn't exist | ||
| let srcStat | ||
| if (path.isAbsolute(srcpath)) { | ||
| srcStat = await fs.stat(srcpath) | ||
| } else { | ||
| const dstdir = path.dirname(dstpath) | ||
| const relativeToDst = path.join(dstdir, srcpath) | ||
| try { | ||
| srcStat = await fs.stat(relativeToDst) | ||
| } catch { | ||
| srcStat = await fs.stat(srcpath) | ||
| } | ||
| } | ||
| const dstStat = await fs.stat(dstpath) | ||
| if (areIdentical(srcStat, dstStat)) return | ||
@@ -50,3 +61,17 @@ } | ||
| if (stats && stats.isSymbolicLink()) { | ||
| const srcStat = fs.statSync(srcpath) | ||
| // When srcpath is relative, resolve it relative to dstpath's directory | ||
| // (standard symlink behavior) or fall back to cwd if that doesn't exist | ||
| let srcStat | ||
| if (path.isAbsolute(srcpath)) { | ||
| srcStat = fs.statSync(srcpath) | ||
| } else { | ||
| const dstdir = path.dirname(dstpath) | ||
| const relativeToDst = path.join(dstdir, srcpath) | ||
| try { | ||
| srcStat = fs.statSync(relativeToDst) | ||
| } catch { | ||
| srcStat = fs.statSync(srcpath) | ||
| } | ||
| } | ||
| const dstStat = fs.statSync(dstpath) | ||
@@ -53,0 +78,0 @@ if (areIdentical(srcStat, dstStat)) return |
+2
-2
| { | ||
| "name": "fs-extra", | ||
| "version": "11.3.3", | ||
| "version": "11.3.4", | ||
| "description": "fs-extra contains methods that aren't included in the vanilla Node.js fs package. Such as recursive mkdir, copy, and remove.", | ||
@@ -11,3 +11,3 @@ "engines": { | ||
| "type": "git", | ||
| "url": "https://github.com/jprichardson/node-fs-extra" | ||
| "url": "git+https://github.com/jprichardson/node-fs-extra.git" | ||
| }, | ||
@@ -14,0 +14,0 @@ "keywords": [ |
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
57708
1.53%1310
1.87%