Fix incorrect path to about:failure source.

This commit is contained in:
Josh Matthews 2014-09-13 11:57:37 -04:00
parent 8748818b7e
commit c861d845b6

View file

@ -28,7 +28,11 @@ pub fn factory(mut load_data: LoadData, start_chan: Sender<LoadResponse>) {
// FIXME: Find a way to load this without relying on the `../src` directory.
let mut path = os::self_exe_path().expect("can't get exe path");
path.pop();
path.push_many(["src", "test", "html", "failure.html"]);
if !path.join(Path::new("./tests/")).is_dir() {
path.pop();
}
path.push_many(["tests", "html", "failure.html"]);
assert!(path.exists());
load_data.url = Url::from_file_path(&path).unwrap();
}
_ => {