Prechádzať zdrojové kódy

Try to replace toSlash with ReplaceAll

Toby Chui 3 rokov pred
rodič
commit
9184ddedb7

+ 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
 }