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(
557
557
for cnum in resolver. cstore ( ) . crates_untracked ( ) {
558
558
let source = resolver. cstore ( ) . crate_source_untracked ( cnum) ;
559
559
if let Some ( ( path, _) ) = source. dylib {
560
- files. push ( escape_dep_filename ( & FileName :: Real ( path) ) ) ;
560
+ files. push ( escape_dep_filename ( & path. into ( ) ) ) ;
561
561
}
562
562
if let Some ( ( path, _) ) = source. rlib {
563
- files. push ( escape_dep_filename ( & FileName :: Real ( path) ) ) ;
563
+ files. push ( escape_dep_filename ( & path. into ( ) ) ) ;
564
564
}
565
565
if let Some ( ( path, _) ) = source. rmeta {
566
- files. push ( escape_dep_filename ( & FileName :: Real ( path) ) ) ;
566
+ files. push ( escape_dep_filename ( & path. into ( ) ) ) ;
567
567
}
568
568
}
569
569
} ) ;
Original file line number Diff line number Diff line change @@ -123,7 +123,11 @@ impl std::fmt::Display for FileName {
123
123
impl From < PathBuf > for FileName {
124
124
fn from ( p : PathBuf ) -> Self {
125
125
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
+ }
127
131
}
128
132
}
129
133
You can’t perform that action at this time.
0 commit comments