Skip to content

Commit

Permalink
Fix regression in cleaning remote path introduced in v1.0.0-RC1
Browse files Browse the repository at this point in the history
  • Loading branch information
wilriker committed Jul 30, 2019
1 parent 611c228 commit 291ae27
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils.go
Expand Up @@ -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
}
Expand Down

0 comments on commit 291ae27

Please sign in to comment.