diff options
| author | Thomas Jespersen <laumann.thomas@gmail.com> | 2017-03-17 23:11:27 +0100 |
|---|---|---|
| committer | Thomas Jespersen <tj@asseco.dk> | 2017-03-30 13:51:16 +0200 |
| commit | b3763862280946cab09cbedc4ad5626ebd95a5b2 (patch) | |
| tree | a4e09d57e1e409228dbd96ef09d78798f5f6d7f7 /src/libstd/sys_common | |
| parent | fe151194e9a919ab23c2bb356767a5cbfa3811e7 (diff) | |
| download | rust-b3763862280946cab09cbedc4ad5626ebd95a5b2.tar.gz rust-b3763862280946cab09cbedc4ad5626ebd95a5b2.zip | |
Replace hardcoded forward slash with path::MAIN_SEPARATOR
Fixes #40149
Diffstat (limited to 'src/libstd/sys_common')
| -rw-r--r-- | src/libstd/sys_common/backtrace.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/sys_common/backtrace.rs b/src/libstd/sys_common/backtrace.rs index 99297b781e4..f5c188f7a75 100644 --- a/src/libstd/sys_common/backtrace.rs +++ b/src/libstd/sys_common/backtrace.rs @@ -19,7 +19,7 @@ use io; use libc; use str; use sync::atomic::{self, Ordering}; -use path::Path; +use path::{self, Path}; use sys::mutex::Mutex; use ptr; @@ -262,7 +262,7 @@ fn output_fileline(w: &mut Write, file: &[u8], line: libc::c_int, if let Ok(cwd) = env::current_dir() { if let Ok(stripped) = file_path.strip_prefix(&cwd) { if let Some(s) = stripped.to_str() { - write!(w, " at ./{}:{}", s, line)?; + write!(w, " at .{}{}:{}", path::MAIN_SEPARATOR, s, line)?; already_printed = true; } } |
