Bläddra i källkod

Added force rewrite for Windows path

Toby Chui 3 år sedan
förälder
incheckning
eb97178146
1 ändrade filer med 1 tillägg och 1 borttagningar
  1. 1 1
      mod/filesystem/abstractions/smbfs/smbfs.go

+ 1 - 1
mod/filesystem/abstractions/smbfs/smbfs.go

@@ -177,7 +177,7 @@ func (a ServerMessageBlockFileSystemAbstraction) VirtualPathToRealPath(subpath s
 func (a ServerMessageBlockFileSystemAbstraction) RealPathToVirtualPath(fullpath string, username string) (string, error) {
 	fullpath = filterFilepath(fullpath)
 	fullpath = strings.TrimPrefix(fullpath, "\\")
-	vpath := a.UUID + ":/" + filepath.ToSlash(fullpath)
+	vpath := a.UUID + ":/" + strings.ReplaceAll(fullpath, "\\", "/")
 	return vpath, nil
 }