-
Notifications
You must be signed in to change notification settings - Fork 69
Closed
Description
works when resolving paths. repro code (only tested on linux):
import { fdir } from 'fdir';
const files = await new fdir()
.exclude((_, f) => {
// doing this to avoid crawling anything recursively
console.log('ignoring', f);
return true;
})
.withSymlinks({ resolvePaths: false })
.crawl('/')
.withPromise();
console.log(files);it looks like isRecursive from resolve-symlinks.ts gets called with the following arguments and enters an infinite loop:
'/lib', '/usr/lib', {
root: '',
paths: [],
groups: [],
counts: Counter { _files: 0, _directories: 1 },
options: {
maxDepth: Infinity,
suppressErrors: true,
pathSeparator: '/',
filters: [],
exclude: [Function (anonymous)],
resolveSymlinks: true,
useRealPaths: false,
resolvePaths: true,
includeBasePath: true
},
queue: Queue { onQueueEmpty: [Function (anonymous)], count: 4 },
symlinks: Map(0) {},
visited: [ '/' ]
}the while loop of the function seems to always run with the variables parent = "/", state.root = "", depth = 1. state.root doesn't look like it's properly computed?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels