diff --git a/internal/operations/path.go b/internal/operations/path.go index 80775a73..cb6bd429 100644 --- a/internal/operations/path.go +++ b/internal/operations/path.go @@ -11,6 +11,8 @@ import ( log "github.com/sirupsen/logrus" ) +// ActualPath Get the actual path +// !!! maybe and \ in the path when use windows local func ActualPath(account driver.Additional, rawPath string) string { if i, ok := account.(driver.IRootFolderPath); ok { rawPath = stdpath.Join(i.GetRootFolderPath(), rawPath) diff --git a/pkg/utils/path.go b/pkg/utils/path.go index c6a5292d..30a0dbd7 100644 --- a/pkg/utils/path.go +++ b/pkg/utils/path.go @@ -3,6 +3,7 @@ package utils import ( stdpath "path" "path/filepath" + "runtime" "strings" ) @@ -10,7 +11,7 @@ import ( func StandardizePath(path string) string { path = strings.TrimSuffix(path, "/") // abs path - if filepath.IsAbs(path) { + if filepath.IsAbs(path) && runtime.GOOS == "windows" { return path } // relative path with prefix '..'