diff options
| author | Brian Anderson <banderson@mozilla.com> | 2012-08-29 13:59:02 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2012-08-29 14:28:37 -0700 |
| commit | 8aca44ee0cdde30e8eb7c826f685e35a797e00e4 (patch) | |
| tree | f48054f0eb750cce0623699ccc4f637230e465bc /src/rustc | |
| parent | fd12188c0765e095e8bed00864f30de15e884c33 (diff) | |
core: Don't normalize paths by default. Add a normalize method
Diffstat (limited to 'src/rustc')
| -rw-r--r-- | src/rustc/back/rpath.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/rustc/back/rpath.rs b/src/rustc/back/rpath.rs index 0d02821a24c..fa02b617606 100644 --- a/src/rustc/back/rpath.rs +++ b/src/rustc/back/rpath.rs @@ -117,6 +117,8 @@ fn get_rpath_relative_to_output(os: session::os, fn get_relative_to(abs1: &Path, abs2: &Path) -> Path { assert abs1.is_absolute; assert abs2.is_absolute; + let abs1 = abs1.normalize(); + let abs2 = abs2.normalize(); debug!("finding relative path from %s to %s", abs1.to_str(), abs2.to_str()); let split1 = abs1.components; @@ -295,7 +297,7 @@ mod test { let o = session::os_linux; let res = get_rpath_relative_to_output(o, &Path("bin/rustc"), &Path("lib/libstd.so")); - assert res == Path("$ORIGIN/../lib"); + assert res.to_str() == ~"$ORIGIN/../lib"; } #[test] @@ -304,7 +306,7 @@ mod test { let o = session::os_freebsd; let res = get_rpath_relative_to_output(o, &Path("bin/rustc"), &Path("lib/libstd.so")); - assert res == Path("$ORIGIN/../lib"); + assert res.to_str() == ~"$ORIGIN/../lib"; } #[test] @@ -315,7 +317,7 @@ mod test { let res = get_rpath_relative_to_output(o, &Path("bin/rustc"), &Path("lib/libstd.so")); - assert res == Path("@executable_path/../lib"); + assert res.to_str() == ~"@executable_path/../lib"; } #[test] |
