aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--weed/util/file_util.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/weed/util/file_util.go b/weed/util/file_util.go
index 70135180d..f83f80265 100644
--- a/weed/util/file_util.go
+++ b/weed/util/file_util.go
@@ -69,6 +69,10 @@ func CheckFile(filename string) (exists, canRead, canWrite bool, modTime time.Ti
func ResolvePath(path string) string {
+ if !strings.Contains(path, "~") {
+ return path
+ }
+
usr, _ := user.Current()
dir := usr.HomeDir