ListDirSorted check for excludefile

This commit is contained in:
Iakov Davydov 2017-11-16 15:38:25 +01:00 committed by Nick Craig-Wood
parent 37aaa19f3a
commit 557dd8f031

View File

@ -622,6 +622,10 @@ func ListDirSorted(fs Fs, includeAll bool, dir string) (entries DirEntries, err
if err != nil {
return nil, err
}
if !includeAll && Config.Filter.ListContainsExcludeFile(entries) {
Debugf(dir, "Excluded from sync (and deletion) based on exclude file")
return nil, nil
}
return filterAndSortDir(entries, includeAll, dir, Config.Filter.IncludeObject, Config.Filter.IncludeDirectory)
}