瀏覽代碼

ft: 不监听隐藏目录

master
SisMaker 2 天之前
父節點
當前提交
348134a6f9
共有 1 個檔案被更改,包括 12 行新增12 行删除
  1. +12
    -12
      fileSync.go

+ 12
- 12
fileSync.go 查看文件

@ -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 {

Loading…
取消
儲存