chore: Ignore hidden folders and files

This commit is contained in:
kekskurse 2025-08-04 01:05:50 +02:00
parent 963b9fa708
commit 24868c0abc

View file

@ -19,6 +19,9 @@ func ListFilesFromHDD(opath string) ([]File, error) {
if err != nil { if err != nil {
return err // z.B. fehlende Leserechte return err // z.B. fehlende Leserechte
} }
if strings.HasPrefix(info.Name(), ".") {
return nil
}
if !info.IsDir() { if !info.IsDir() {
v := Version{} v := Version{}
@ -37,6 +40,10 @@ func ListFilesFromHDD(opath string) ([]File, error) {
f.Name = strings.TrimPrefix(path, opath) f.Name = strings.TrimPrefix(path, opath)
f.Versions = append(f.Versions, v) f.Versions = append(f.Versions, v)
if strings.HasPrefix(f.Name, ".") {
return nil
}
FileList = append(FileList, f) FileList = append(FileList, f)
} }