-
-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Description
Observed some errors when checking entire user directory. (Early AI-generated solution attached.)
Wide scans may lead to many warning messages. These would be useful to make opt-in or opt-out. (Probably opt-in, as with a -v
flag.)
After function walkDirectory(directory) {
:
const MAX_PATH_LENGTH = 255; // Adjust this value based on your OS limits
After const fullPath = path.join(directory, file);
:
if (fullPath.length > MAX_PATH_LENGTH) {
console.warn(`Skipping file or directory with path too long: ${fullPath}`);
return;
}
try {
const stats = fs.lstatSync(fullPath);
if (stats.isSymbolicLink()) {
console.warn(`Skipping symbolic link: ${fullPath}`);
return;
}
// …
}
Metadata
Metadata
Assignees
Labels
No labels