ignore hidden files and folders
This commit is contained in:
parent
5ca8a92e22
commit
321c18b6bd
@ -44,6 +44,11 @@ func ScanLocalFileStructure(path string) (map[string]*FilesystemNode, error) {
|
||||
return nil
|
||||
}
|
||||
|
||||
if strings.HasPrefix(info.Name(), ".") {
|
||||
logrus.Tracef("Skipping hidden file or directory %s", path)
|
||||
return nil
|
||||
}
|
||||
|
||||
extension := strings.ToLower(filepath.Ext(path))
|
||||
if extension != ".jpg" && extension != ".png" && !info.IsDir() {
|
||||
return nil
|
||||
|
Loading…
Reference in New Issue
Block a user