diff options
| author | chrislu <chris.lu@gmail.com> | 2022-08-25 00:19:08 -0700 |
|---|---|---|
| committer | chrislu <chris.lu@gmail.com> | 2022-08-25 00:19:08 -0700 |
| commit | dbf0de4ce1a03323d46beafb1ede36302d61534e (patch) | |
| tree | b5ff7c11292030555c9fb1ad3bcdd5542f5a332c /weed/command | |
| parent | 2930263dfdcc8891b313427b6160e70d5484bbc1 (diff) | |
| download | seaweedfs-dbf0de4ce1a03323d46beafb1ede36302d61534e.tar.xz seaweedfs-dbf0de4ce1a03323d46beafb1ede36302d61534e.zip | |
minor clean up
Diffstat (limited to 'weed/command')
| -rw-r--r-- | weed/command/fix.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/weed/command/fix.go b/weed/command/fix.go index 8ab879d3b..46cfc40db 100644 --- a/weed/command/fix.go +++ b/weed/command/fix.go @@ -62,6 +62,10 @@ func (scanner *VolumeFileScanner4Fix) VisitNeedle(n *needle.Needle, offset int64 func runFix(cmd *Command, args []string) bool { for _, arg := range args { basePath, f := path.Split(util.ResolvePath(arg)) + if util.FolderExists(arg) { + basePath = arg + f = "" + } files := []fs.DirEntry{} if f == "" { @@ -72,7 +76,7 @@ func runFix(cmd *Command, args []string) bool { } files = fileInfo } else { - fileInfo, err := os.Stat(basePath + f) + fileInfo, err := os.Stat(arg) if err != nil { fmt.Println(err) return false |
