Append trailing slash to targetURL only if absent (#1731)
This commit is contained in:
committed by
Harshavardhana
parent
cc4227e3f2
commit
9766ff1805
+3
-1
@@ -145,7 +145,9 @@ func mainList(ctx *cli.Context) {
|
||||
fatalIf(err.Trace(targetURL), "Unable to initialize target ‘"+targetURL+"’.")
|
||||
}
|
||||
} else if st.Type.IsDir() {
|
||||
targetURL = targetURL + string(clnt.GetURL().Separator)
|
||||
if !strings.HasSuffix(targetURL, string(clnt.GetURL().Separator)) {
|
||||
targetURL = targetURL + string(clnt.GetURL().Separator)
|
||||
}
|
||||
clnt, err = newClient(targetURL)
|
||||
fatalIf(err.Trace(targetURL), "Unable to initialize target ‘"+targetURL+"’.")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user