Skip to content

Commit

Permalink
Merge pull request #59 from justindhillon/skip-symbolic-links
Browse files Browse the repository at this point in the history
Skip Symbolic Links
  • Loading branch information
justindhillon authored Jan 30, 2024
2 parents 996004f + 84b3f91 commit ef40a8e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ export default async function linkInspector(arg: string, callback: any, path: st
} catch {}

try { // If arg is a path
const stats: fs.Stats = fs.statSync(arg);
const stats: fs.Stats = fs.lstatSync(arg);

// Skip symbolic links
if (stats.isSymbolicLink()) return;

// Skip files over 100mb
if (100*1024*1024 < stats.size) return
Expand Down

0 comments on commit ef40a8e

Please sign in to comment.