File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -30,21 +30,22 @@ pub fn find_lib_path() -> Result<PathBuf, Error> {
3030
3131fn collect_possible_directories ( ) -> Vec < PathBuf > {
3232 let mut paths = vec ! [ ] ;
33+ let separator = if cfg ! ( windows) { ';' } else { ':' } ;
3334
3435 if let Ok ( lib_paths) = env:: var ( "LD_LIBRARY_PATH" ) {
35- for item in lib_paths. split ( ':' ) {
36+ for item in lib_paths. split ( separator ) {
3637 paths. push ( PathBuf :: from ( item) ) ;
3738 }
3839 }
3940
4041 if let Ok ( lib_paths) = env:: var ( "DYLD_FALLBACK_LIBRARY_PATH" ) {
41- for item in lib_paths. split ( ':' ) {
42+ for item in lib_paths. split ( separator ) {
4243 paths. push ( PathBuf :: from ( item) ) ;
4344 }
4445 }
4546
4647 if let Ok ( bin_paths) = env:: var ( "PATH" ) {
47- for item in bin_paths. split ( ':' ) {
48+ for item in bin_paths. split ( separator ) {
4849 let mut possible_path = PathBuf :: from ( item) ;
4950
5051 possible_path. pop ( ) ;
You can’t perform that action at this time.
0 commit comments