Skip to content

Commit 6a6aec0

Browse files
committed
Fix --out-dir a bit more in driver.
1 parent b0d5436 commit 6a6aec0

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/comp/driver/driver.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -564,11 +564,13 @@ fn build_output_filenames(ifile: str,
564564
}
565565
};
566566

567-
let (base_path, _) = if !input_is_stdin(ifile) {
568-
fs::splitext(ifile)
567+
let base_filename = if !input_is_stdin(ifile) {
568+
let (path, _) = fs::splitext(ifile);
569+
fs::basename(path)
569570
} else {
570-
(fs::connect(dirname, "rust_out"), "")
571+
"rust_out"
571572
};
573+
let base_path = fs::connect(dirname, base_filename);
572574

573575

574576
if sess.building_library {

0 commit comments

Comments
 (0)