aboutsummaryrefslogtreecommitdiff
path: root/weed/util/file_util.go
diff options
context:
space:
mode:
authorbingoohuang <bingoo.huang@gmail.com>2021-03-01 09:22:46 +0800
committerGitHub <noreply@github.com>2021-03-01 09:22:46 +0800
commiteb65cbf0025e4bfbfe6359a5ba5bfbd094c3e81d (patch)
tree7aa6c966d0d36a6cd4d2c16735b6b265527af142 /weed/util/file_util.go
parent0cfbe8f059c9f97f606e7c76f77aa8a8a8c97765 (diff)
parente52c94640e9898be5308a77867ecea5ef1567c5b (diff)
downloadseaweedfs-eb65cbf0025e4bfbfe6359a5ba5bfbd094c3e81d.tar.xz
seaweedfs-eb65cbf0025e4bfbfe6359a5ba5bfbd094c3e81d.zip
Merge pull request #5 from chrislusf/master
sync
Diffstat (limited to 'weed/util/file_util.go')
-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