aboutsummaryrefslogtreecommitdiff
path: root/weed/command/backup.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2020-07-16 22:50:14 -0700
committerChris Lu <chris.lu@gmail.com>2020-07-16 22:50:14 -0700
commitf43146b237bc5bbfb7033f6e427b5299554c0824 (patch)
treedf4a05999d67abb7c4765d39eddc01318521169b /weed/command/backup.go
parentbefb396892deb7e5fdaefaf2f952bd744cc08ace (diff)
downloadseaweedfs-f43146b237bc5bbfb7033f6e427b5299554c0824.tar.xz
seaweedfs-f43146b237bc5bbfb7033f6e427b5299554c0824.zip
resolve directories if containing home directory
Diffstat (limited to 'weed/command/backup.go')
-rw-r--r--weed/command/backup.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/weed/command/backup.go b/weed/command/backup.go
index 615be80cf..950cbf68e 100644
--- a/weed/command/backup.go
+++ b/weed/command/backup.go
@@ -112,7 +112,7 @@ func runBackup(cmd *Command, args []string) bool {
return true
}
}
- v, err := storage.NewVolume(*s.dir, *s.collection, vid, storage.NeedleMapInMemory, replication, ttl, 0, 0)
+ v, err := storage.NewVolume(util.ResolvePath(*s.dir), *s.collection, vid, storage.NeedleMapInMemory, replication, ttl, 0, 0)
if err != nil {
fmt.Printf("Error creating or reading from volume %d: %v\n", vid, err)
return true
@@ -137,7 +137,7 @@ func runBackup(cmd *Command, args []string) bool {
// remove the old data
v.Destroy()
// recreate an empty volume
- v, err = storage.NewVolume(*s.dir, *s.collection, vid, storage.NeedleMapInMemory, replication, ttl, 0, 0)
+ v, err = storage.NewVolume(util.ResolvePath(*s.dir), *s.collection, vid, storage.NeedleMapInMemory, replication, ttl, 0, 0)
if err != nil {
fmt.Printf("Error creating or reading from volume %d: %v\n", vid, err)
return true