Explorar el Código

Added force rewrite for Windows path

Toby Chui hace 3 años
padre
commit
eb97178146
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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
 }