File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -557,13 +557,13 @@ fn write_out_deps(
557557 for cnum in resolver. cstore ( ) . crates_untracked ( ) {
558558 let source = resolver. cstore ( ) . crate_source_untracked ( cnum) ;
559559 if let Some ( ( path, _) ) = source. dylib {
560- files. push ( escape_dep_filename ( & FileName :: Real ( path) ) ) ;
560+ files. push ( escape_dep_filename ( & path. into ( ) ) ) ;
561561 }
562562 if let Some ( ( path, _) ) = source. rlib {
563- files. push ( escape_dep_filename ( & FileName :: Real ( path) ) ) ;
563+ files. push ( escape_dep_filename ( & path. into ( ) ) ) ;
564564 }
565565 if let Some ( ( path, _) ) = source. rmeta {
566- files. push ( escape_dep_filename ( & FileName :: Real ( path) ) ) ;
566+ files. push ( escape_dep_filename ( & path. into ( ) ) ) ;
567567 }
568568 }
569569 } ) ;
Original file line number Diff line number Diff line change @@ -123,7 +123,11 @@ impl std::fmt::Display for FileName {
123123impl From < PathBuf > for FileName {
124124 fn from ( p : PathBuf ) -> Self {
125125 assert ! ( !p. to_string_lossy( ) . ends_with( '>' ) ) ;
126- FileName :: Real ( p)
126+ if cfg ! ( not( windows) ) {
127+ FileName :: Real ( p. canonlicalize ( ) . unwrap_or ( p) )
128+ } else {
129+ FileName :: Real ( p)
130+ }
127131 }
128132}
129133
You can’t perform that action at this time.
0 commit comments