Kaynağa Gözat

2nd try fix of the smbfs vpath issue

Toby Chui 3 yıl önce
ebeveyn
işleme
a958a4394a
1 değiştirilmiş dosya ile 2 ekleme ve 2 silme
  1. 2 2
      mod/filesystem/abstractions/smbfs/smbfs.go

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

@@ -166,9 +166,9 @@ func (a ServerMessageBlockFileSystemAbstraction) VirtualPathToRealPath(subpath s
 	subpath = filterFilepath(subpath)
 
 	if a.Hierarchy == "user" {
-		return filepath.ToSlash(filepath.Clean(filepath.Join("users", username, subpath))), nil
+		return strings.ReplaceAll(filepath.Clean(filepath.Join("users", username, subpath)), "\\", "/"), nil
 	} else if a.Hierarchy == "public" {
-		return filepath.ToSlash(filepath.Clean(subpath)), nil
+		return strings.ReplaceAll(filepath.Clean(subpath), "\\", "/"), nil
 	}
 
 	return "", arozfs.ErrVpathResolveFailed