Procházet zdrojové kódy

Try to replace toSlash with ReplaceAll

Toby Chui před 3 roky
rodič
revize
9184ddedb7
1 změnil soubory, kde provedl 2 přidání a 2 odebrání
  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
 }