1
0
mirror of https://github.com/tw93/Mole.git synced 2026-02-04 12:41:46 +00:00

feat: add default directory skipping for common system and special directories during analysis.

This commit is contained in:
Tw93
2025-12-13 21:09:16 +08:00
parent 3263a13f44
commit 5b3c7d3324
3 changed files with 11 additions and 0 deletions

Binary file not shown.

View File

@@ -181,6 +181,12 @@ var skipSystemDirs = map[string]bool{
".MobileBackups": true, // Time Machine local snapshots
}
var defaultSkipDirs = map[string]bool{
"nfs": true, // Network File System
"PHD": true, // Parallels Shared Folders / Home Directories
"Permissions": true, // Common macOS deny folder
}
var skipExtensions = map[string]bool{
".go": true,
".js": true,

View File

@@ -126,6 +126,11 @@ func scanPathConcurrent(root string, filesScanned, dirsScanned, bytesScanned *in
}
if child.IsDir() {
// Check if directory should be skipped based on user configuration
if defaultSkipDirs[child.Name()] {
continue
}
// In root directory, skip system directories completely
if isRootDir && skipSystemDirs[child.Name()] {
continue