mirror of
https://github.com/tw93/Mole.git
synced 2026-02-16 17:35:16 +00:00
merge main
This commit is contained in:
BIN
bin/analyze-go
BIN
bin/analyze-go
Binary file not shown.
@@ -21,8 +21,8 @@ import (
|
|||||||
"syscall"
|
"syscall"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
tea "github.com/charmbracelet/bubbletea"
|
|
||||||
"github.com/cespare/xxhash/v2"
|
"github.com/cespare/xxhash/v2"
|
||||||
|
tea "github.com/charmbracelet/bubbletea"
|
||||||
"golang.org/x/sync/singleflight"
|
"golang.org/x/sync/singleflight"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -444,7 +444,7 @@ func createOverviewEntries() []dirEntry {
|
|||||||
dirEntry{name: "System Library", path: "/Library", isDir: true, size: -1},
|
dirEntry{name: "System Library", path: "/Library", isDir: true, size: -1},
|
||||||
)
|
)
|
||||||
|
|
||||||
// Add Volumes if exists
|
// Add Volumes shortcut only when it contains real mounted folders (e.g., external disks)
|
||||||
if hasUsefulVolumeMounts("/Volumes") {
|
if hasUsefulVolumeMounts("/Volumes") {
|
||||||
entries = append(entries, dirEntry{name: "Volumes", path: "/Volumes", isDir: true, size: -1})
|
entries = append(entries, dirEntry{name: "Volumes", path: "/Volumes", isDir: true, size: -1})
|
||||||
}
|
}
|
||||||
@@ -459,13 +459,19 @@ func hasUsefulVolumeMounts(path string) bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for _, entry := range entries {
|
for _, entry := range entries {
|
||||||
if entry.Type()&fs.ModeSymlink != 0 {
|
name := entry.Name()
|
||||||
continue // Skip synthetic system links like "Macintosh HD"
|
// Skip hidden control entries for Spotlight/TimeMachine etc.
|
||||||
|
if strings.HasPrefix(name, ".") {
|
||||||
|
continue
|
||||||
}
|
}
|
||||||
info, err := entry.Info()
|
|
||||||
|
info, err := os.Lstat(filepath.Join(path, name))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
if info.Mode()&fs.ModeSymlink != 0 {
|
||||||
|
continue // Ignore the synthetic MacintoshHD link
|
||||||
|
}
|
||||||
if info.IsDir() {
|
if info.IsDir() {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|||||||
2
mole
2
mole
@@ -22,7 +22,7 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|||||||
source "$SCRIPT_DIR/lib/common.sh"
|
source "$SCRIPT_DIR/lib/common.sh"
|
||||||
|
|
||||||
# Version info
|
# Version info
|
||||||
VERSION="1.9.11"
|
VERSION="1.9.12"
|
||||||
MOLE_TAGLINE="can dig deep to clean your Mac."
|
MOLE_TAGLINE="can dig deep to clean your Mac."
|
||||||
|
|
||||||
# Get latest version from remote repository
|
# Get latest version from remote repository
|
||||||
|
|||||||
Reference in New Issue
Block a user