|
@ -62,6 +62,10 @@ func (scanner *VolumeFileScanner4Fix) VisitNeedle(n *needle.Needle, offset int64 |
|
|
func runFix(cmd *Command, args []string) bool { |
|
|
func runFix(cmd *Command, args []string) bool { |
|
|
for _, arg := range args { |
|
|
for _, arg := range args { |
|
|
basePath, f := path.Split(util.ResolvePath(arg)) |
|
|
basePath, f := path.Split(util.ResolvePath(arg)) |
|
|
|
|
|
if util.FolderExists(arg) { |
|
|
|
|
|
basePath = arg |
|
|
|
|
|
f = "" |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
files := []fs.DirEntry{} |
|
|
files := []fs.DirEntry{} |
|
|
if f == "" { |
|
|
if f == "" { |
|
@ -72,7 +76,7 @@ func runFix(cmd *Command, args []string) bool { |
|
|
} |
|
|
} |
|
|
files = fileInfo |
|
|
files = fileInfo |
|
|
} else { |
|
|
} else { |
|
|
fileInfo, err := os.Stat(basePath + f) |
|
|
|
|
|
|
|
|
fileInfo, err := os.Stat(arg) |
|
|
if err != nil { |
|
|
if err != nil { |
|
|
fmt.Println(err) |
|
|
fmt.Println(err) |
|
|
return false |
|
|
return false |
|
|