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
no symbolic link files are returned when using walk(). See below to reproduce.
when using followSymlinks: true, the path to the destination is returned and labeled { isFile: false, isSymlink: true }, even though the destination is a regular file.
Steps to Reproduce
// walkTest.tsimport*asfsfrom"https://deno.land/std@0.142.0/fs/mod.ts";fs.emptyDirSync("dir");fs.ensureFileSync("dir/files/a.txt");Deno.writeTextFileSync("dir/files/a.txt","A");// FIXME: See https://github.com/denoland/deno_std/issues/2312// fs.ensureSymlinkSync("../files/a.txt", "dir/links/a.txt");fs.ensureDirSync("dir/links");awaitDeno.run({cmd: ["ln","-s","../files/a.txt","dir/links/a.txt"],}).status();/* dir ├── files │ └── a.txt └── links └── a.txt -> ../files/a.txt*/console.log(">>> followSymlinks: false >>>>");for(constfoffs.walkSync("dir",{followSymlinks: false})){console.log(f);// dir/links/a.txt is not returned}console.log(">>> followSymlinks: true >>>>");for(constfoffs.walkSync("dir",{followSymlinks: true})){console.log(f);// returns:// {// path: "/home/joe/tmp/walkTest/dir/files/a.txt", <-- this is the path to the destination, not the link file.// name: "a.txt",// isFile: false,// isDirectory: false,// isSymlink: true <-- "path" is a file, not a symlink// }}
Expected behavior
fs.walkSync("dir", { followSymlinks: false } should include:
Describe the bug
This is really 2 issues:
no symbolic link files are returned when using
walk()
. See below to reproduce.when using
followSymlinks: true
, the path to the destination is returned and labeled{ isFile: false, isSymlink: true }
, even though the destination is a regular file.Steps to Reproduce
Expected behavior
fs.walkSync("dir", { followSymlinks: false }
should include:fs.walkSync("dir", { followSymlinks: true })
should return:Environment
The text was updated successfully, but these errors were encountered: