From c861d845b662612f5054fcdc4337912e43cc3ac6 Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Sat, 13 Sep 2014 11:57:37 -0400 Subject: [PATCH] Fix incorrect path to about:failure source. --- components/net/about_loader.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/components/net/about_loader.rs b/components/net/about_loader.rs index af855d26071..3c74a8dd8de 100644 --- a/components/net/about_loader.rs +++ b/components/net/about_loader.rs @@ -28,7 +28,11 @@ pub fn factory(mut load_data: LoadData, start_chan: Sender) { // 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(); } _ => {