aboutsummaryrefslogtreecommitdiff
path: root/modules/storage/local.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/storage/local.go')
-rw-r--r--modules/storage/local.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/modules/storage/local.go b/modules/storage/local.go
index a6a9d54a8..05bf1fb28 100644
--- a/modules/storage/local.go
+++ b/modules/storage/local.go
@@ -8,7 +8,6 @@ import (
"io"
"net/url"
"os"
- "path"
"path/filepath"
"strings"
@@ -59,7 +58,7 @@ func NewLocalStorage(ctx context.Context, cfg interface{}) (ObjectStorage, error
}
func (l *LocalStorage) buildLocalPath(p string) string {
- return filepath.Join(l.dir, path.Clean("/" + strings.ReplaceAll(p, "\\", "/"))[1:])
+ return filepath.Join(l.dir, util.CleanPath(strings.ReplaceAll(p, "\\", "/")))
}
// Open a file