aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/swarm/upload.go
diff options
context:
space:
mode:
authorJanos Guljas <janos@resenje.org>2018-09-27 15:43:00 +0800
committerJanos Guljas <janos@resenje.org>2018-09-27 15:43:00 +0800
commita5e6bf7eefbe6f56cf688b3542fe373c4670cb65 (patch)
tree8b712ef8fb72b354346c7b1092261c469ebd7d8a /cmd/swarm/upload.go
parent0d5e1e7bc9ad4044a679ab5429d118b2a0e8afe7 (diff)
parente39a9b3480af0ac8044294f46e0e9e4c3948d23c (diff)
downloaddexon-a5e6bf7eefbe6f56cf688b3542fe373c4670cb65.tar.gz
dexon-a5e6bf7eefbe6f56cf688b3542fe373c4670cb65.tar.zst
dexon-a5e6bf7eefbe6f56cf688b3542fe373c4670cb65.zip
Merge branch 'master' into max-stream-peer-servers
Diffstat (limited to 'cmd/swarm/upload.go')
-rw-r--r--cmd/swarm/upload.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/cmd/swarm/upload.go b/cmd/swarm/upload.go
index 9eae2a3f8..f76cb1b98 100644
--- a/cmd/swarm/upload.go
+++ b/cmd/swarm/upload.go
@@ -138,6 +138,12 @@ func upload(ctx *cli.Context) {
// 3. cleans the path, e.g. /a/b/../c -> /a/c
// Note, it has limitations, e.g. ~someuser/tmp will not be expanded
func expandPath(p string) string {
+ if i := strings.Index(p, ":"); i > 0 {
+ return p
+ }
+ if i := strings.Index(p, "@"); i > 0 {
+ return p
+ }
if strings.HasPrefix(p, "~/") || strings.HasPrefix(p, "~\\") {
if home := homeDir(); home != "" {
p = home + p[1:]