From 291ae276e7d6bd7f9ac5456496ab45463e1f10a9 Mon Sep 17 00:00:00 2001 From: Manuel Coenen Date: Tue, 30 Jul 2019 14:07:42 +0200 Subject: [PATCH] Fix regression in cleaning remote path introduced in v1.0.0-RC1 --- utils.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils.go b/utils.go index 473ef11..75f8418 100644 --- a/utils.go +++ b/utils.go @@ -24,10 +24,10 @@ var absRemotePath = regexp.MustCompile(`^[0-9]:/`) // then remove a trailing slash if any. func CleanRemotePath(path string) string { cleanedPath := strings.TrimSpace(path) - cleanedPath = strings.TrimSuffix(cleanedPath, "/") if !absRemotePath.MatchString(cleanedPath) { cleanedPath = defaultMount + cleanedPath } + cleanedPath = strings.TrimSuffix(cleanedPath, "/") cleanedPath = multiSlashRegex.ReplaceAllString(cleanedPath, "/") return cleanedPath }