Fix empty disk mount detection

This commit is contained in:
mchus committed 2026-04-23 22:58:07 +03:00
1 parent e7917b41b5
commit 0afc1d761b
2 files changed
+13 -5

No files matched your search

+1 -2
View File
@@ -32,8 +32,7 @@ const idFile = "disk.id"
func Probe(mountPath string) (DiskInfo, error) {
info := DiskInfo{MountPath: mountPath, State: DiskAbsent}
entries, err := os.ReadDir(mountPath)
if err != nil || len(entries) == 0 {
if _, err := os.ReadDir(mountPath); err != nil {
return info, nil
}