diff options
| author | hilimd <68371223+hilimd@users.noreply.github.com> | 2020-07-20 15:35:47 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-07-20 15:35:47 +0800 |
| commit | 5850bb733936399babbe2d77f4b27cac312e2798 (patch) | |
| tree | 3966daffbb7b2633906f883e3047511772a4fdcf /weed/command/fix.go | |
| parent | b1616e93474246a624370ad18da98b8371c09ece (diff) | |
| parent | f90d2c93c9e34997a8e76aeefb438ec06b1cd093 (diff) | |
| download | seaweedfs-5850bb733936399babbe2d77f4b27cac312e2798.tar.xz seaweedfs-5850bb733936399babbe2d77f4b27cac312e2798.zip | |
Merge pull request #2 from chrislusf/master
sync
Diffstat (limited to 'weed/command/fix.go')
| -rw-r--r-- | weed/command/fix.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/weed/command/fix.go b/weed/command/fix.go index 223808f4b..e1455790f 100644 --- a/weed/command/fix.go +++ b/weed/command/fix.go @@ -11,6 +11,7 @@ import ( "github.com/chrislusf/seaweedfs/weed/storage/needle_map" "github.com/chrislusf/seaweedfs/weed/storage/super_block" "github.com/chrislusf/seaweedfs/weed/storage/types" + "github.com/chrislusf/seaweedfs/weed/util" ) func init() { @@ -67,7 +68,7 @@ func runFix(cmd *Command, args []string) bool { if *fixVolumeCollection != "" { baseFileName = *fixVolumeCollection + "_" + baseFileName } - indexFileName := path.Join(*fixVolumePath, baseFileName+".idx") + indexFileName := path.Join(util.ResolvePath(*fixVolumePath), baseFileName+".idx") nm := needle_map.NewMemDb() defer nm.Close() @@ -77,7 +78,7 @@ func runFix(cmd *Command, args []string) bool { nm: nm, } - if err := storage.ScanVolumeFile(*fixVolumePath, *fixVolumeCollection, vid, storage.NeedleMapInMemory, scanner); err != nil { + if err := storage.ScanVolumeFile(util.ResolvePath(*fixVolumePath), *fixVolumeCollection, vid, storage.NeedleMapInMemory, scanner); err != nil { glog.Fatalf("scan .dat File: %v", err) os.Remove(indexFileName) } |
