chore: Ignore hidden folders and files
This commit is contained in:
parent
963b9fa708
commit
24868c0abc
1 changed files with 7 additions and 0 deletions
|
|
@ -19,6 +19,9 @@ func ListFilesFromHDD(opath string) ([]File, error) {
|
|||
if err != nil {
|
||||
return err // z.B. fehlende Leserechte
|
||||
}
|
||||
if strings.HasPrefix(info.Name(), ".") {
|
||||
return nil
|
||||
}
|
||||
if !info.IsDir() {
|
||||
v := Version{}
|
||||
|
||||
|
|
@ -37,6 +40,10 @@ func ListFilesFromHDD(opath string) ([]File, error) {
|
|||
f.Name = strings.TrimPrefix(path, opath)
|
||||
f.Versions = append(f.Versions, v)
|
||||
|
||||
if strings.HasPrefix(f.Name, ".") {
|
||||
return nil
|
||||
}
|
||||
|
||||
FileList = append(FileList, f)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue