diff options
| author | Graydon Hoare <graydon@mozilla.com> | 2012-01-18 18:38:54 -0800 |
|---|---|---|
| committer | Graydon Hoare <graydon@mozilla.com> | 2012-01-18 18:44:07 -0800 |
| commit | 6a6aec04a266f5435f5d6f879750761c2cd8fce3 (patch) | |
| tree | 546ce3d4e2b7901aaf82b42d027f75018a5a4853 /src/comp/driver | |
| parent | b0d5436dd0a9d02ed9377c3174e370b188619f9c (diff) | |
| download | rust-6a6aec04a266f5435f5d6f879750761c2cd8fce3.tar.gz rust-6a6aec04a266f5435f5d6f879750761c2cd8fce3.zip | |
Fix --out-dir a bit more in driver.
Diffstat (limited to 'src/comp/driver')
| -rw-r--r-- | src/comp/driver/driver.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/comp/driver/driver.rs b/src/comp/driver/driver.rs index 5a771abc24f..cae0cda7e70 100644 --- a/src/comp/driver/driver.rs +++ b/src/comp/driver/driver.rs @@ -564,11 +564,13 @@ fn build_output_filenames(ifile: str, } }; - let (base_path, _) = if !input_is_stdin(ifile) { - fs::splitext(ifile) + let base_filename = if !input_is_stdin(ifile) { + let (path, _) = fs::splitext(ifile); + fs::basename(path) } else { - (fs::connect(dirname, "rust_out"), "") + "rust_out" }; + let base_path = fs::connect(dirname, base_filename); if sess.building_library { |
