Ver Fonte

Try to replace toSlash with ReplaceAll

Toby Chui há 3 anos atrás
pai
commit
9184ddedb7
1 ficheiros alterados com 2 adições e 2 exclusões
  1. 2 2
      mod/filesystem/abstractions/smbfs/smbfs.go

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

@@ -210,8 +210,8 @@ func (a ServerMessageBlockFileSystemAbstraction) Glob(realpathWildcard string) (
 	}
 
 	for _, thisMatch := range matches {
-		filteredMatches = append(filteredMatches, filepath.ToSlash(thisMatch))
-		fmt.Println(filepath.ToSlash(thisMatch))
+		filteredMatches = append(filteredMatches, strings.ReplaceAll(thisMatch, "\\", "/"))
+		fmt.Println(filepath.ToSlash(thisMatch), strings.ReplaceAll(thisMatch, "\\", "/"))
 	}
 	return filteredMatches, nil
 }