Przeglądaj źródła

Added force rewrite for Windows path

Toby Chui 3 lat temu
rodzic
commit
eb97178146
1 zmienionych plików z 1 dodań i 1 usunięć
  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
 }