`withSymlinks` doesn't work properly with relative paths on when the symlink is at the top level
Closed this issue · 1 comments
SuperchupuDev commented
the following code behaves differently when you add .withRelativePaths()
and a symlink is at the top level. it looks like it just ignores symlinks completely
const b = await new fdir()
.withSymlinks()
.exclude(p => p.includes('.git') || p.includes('node_modules'))
.crawl(process.cwd())
.withPromise();
b.map(p => console.log(p));
however it works if you crawl path.join(process.cwd(), '..')
. using resolvePaths: false
as an argument for withSymlinks
doesn't solve the issue either
it works perfectly without .withRelativePaths()
SuperchupuDev commented
okay, thinking about it it makes sense that withSymlinks
doesn't work with relative paths as symlinks can point to anywhere outside the root, as long as useRealPaths
is true
. if it's false it shouldn't be any hard to process as a relative path