Quellcode durchsuchen

ft: 不监听隐藏目录

master
SisMaker vor 4 Tagen
Ursprung
Commit
348134a6f9
1 geänderte Dateien mit 12 neuen und 12 gelöschten Zeilen
  1. +12
    -12
      fileSync.go

+ 12
- 12
fileSync.go Datei anzeigen

@ -75,18 +75,18 @@ func CollectFile(File string) {
}
func isHidden(path string) bool {
// for i := len(path) - 1; i > 0; i-- {
// if path[i] != '.' {
// continue
// }
// if os.IsPathSeparator(path[i-1]) {
// return true
// }
// }
// if path[0] == '.' {
// return true
// }
return false
for i := len(path) - 1; i > 0; i-- {
if path[i] != '.' {
continue
}
if os.IsPathSeparator(path[i-1]) {
return true
}
}
if path[0] == '.' {
return true
}
return false
}
func isOnlyDir(dirs []string, curDirs string) bool {

Laden…
Abbrechen
Speichern