mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Fix incorrect path to about:failure source.
This commit is contained in:
parent
8748818b7e
commit
c861d845b6
1 changed files with 5 additions and 1 deletions
|
@ -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.
|
// 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");
|
let mut path = os::self_exe_path().expect("can't get exe path");
|
||||||
path.pop();
|
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();
|
load_data.url = Url::from_file_path(&path).unwrap();
|
||||||
}
|
}
|
||||||
_ => {
|
_ => {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue