Browse Source

处理软连接

master
453530270@qq.com 2 years ago
parent
commit
3d99601a23
  1. 5
      fstool/util/fsutil.go

5
fstool/util/fsutil.go

@ -17,6 +17,11 @@ func GetDirFilePaths(dirPath string, relativeOnly bool) ([]string, error) {
if err != nil {
return err
}
// 排除软连接
if info.Mode()&os.ModeSymlink == 0 {
return nil
}
//
if !info.IsDir() {
if relativeOnly {
fileName := filepath.Base(path)

Loading…
Cancel
Save