You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix: Symlink Resolution for Cross-Platform Copy Operations (#1103)
* fix: resolve symlinks relative to their target to handle relative paths on Linux
* minor version update
* added unit test to copy symlink (created using relative path) to a file
* minor text update
* test: verify relative and absolute symlink resolution in recursive directory copy
assert(fs.existsSync(path.join(TEST_DEST_DIR,TEST_SRC_DIR)),'Directory was not copied');
158
165
assert(fs.existsSync(path.join(TEST_DEST_DIR,TEST_SRC_DIR,'outside-file.txt')),'File was not copied');
159
166
assert.equal(fs.readFileSync(path.join(TEST_DEST_DIR,TEST_SRC_DIR,'outside-file.txt'),'utf8'),'This is a file outside the source folder.','File content is incorrect');
160
-
assert(!fs.existsSync(path.join(TEST_DEST_DIR,TEST_SRC_DIR,SYMLINK_NAME)),'Symbolic link should not be copied');
167
+
assert(!fs.existsSync(path.join(TEST_DEST_DIR,TEST_SRC_DIR,ABSOLUTE_SYMLINK)),'First symbolic link should not be copied');
168
+
169
+
// Verify second symlink with relative path
170
+
assert(fs.existsSync(path.join(TEST_DEST_DIR,TEST_SRC_DIR,'outside-file2.txt')),'Second file was not copied');
0 commit comments