소스 검색

Try to replace toSlash with ReplaceAll

Toby Chui 3 년 전
부모
커밋
9184ddedb7
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  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
 }