Skip to content

Commit

Permalink
refactor: simplify symlink check
Browse files Browse the repository at this point in the history
  • Loading branch information
thecodrr committed Sep 26, 2024
1 parent a42701c commit 1f4a5d5
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/api/walker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,9 @@ export class Walker<TOutput extends Output> {
);
if (exclude && exclude(entry.name, path)) continue;
this.walkDirectory(this.state, path, depth - 1, this.walk);
} else if (
entry.isSymbolicLink() &&
resolveSymlinks &&
!excludeSymlinks
) {
} else if (entry.isSymbolicLink() && this.resolveSymlink) {
let path = joinPath.joinPathWithBasePath(entry.name, directoryPath);
this.resolveSymlink!(path, this.state, (stat, resolvedPath) => {
this.resolveSymlink(path, this.state, (stat, resolvedPath) => {
if (stat.isDirectory()) {
resolvedPath = normalizePath(resolvedPath, this.state.options);
if (exclude && exclude(entry.name, resolvedPath)) return;
Expand Down

0 comments on commit 1f4a5d5

Please sign in to comment.