浏览代码

Fixing potential linux issue for smbfs

Toby Chui 3 年之前
父节点
当前提交
2c28cd0a1d
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      mod/filesystem/abstractions/smbfs/smbfs.go

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

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