Pārlūkot izejas kodu

Try to replace toSlash with ReplaceAll

Toby Chui 3 gadi atpakaļ
vecāks
revīzija
9184ddedb7
1 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  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
 }