Procházet zdrojové kódy

Added force rewrite for Windows path

Toby Chui před 3 roky
rodič
revize
eb97178146
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  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
 }