aboutsummaryrefslogtreecommitdiffstats
path: root/components/util/resource_files.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/util/resource_files.rs')
-rw-r--r--components/util/resource_files.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/components/util/resource_files.rs b/components/util/resource_files.rs
index 73e1148cc9a..b40c93f2651 100644
--- a/components/util/resource_files.rs
+++ b/components/util/resource_files.rs
@@ -17,11 +17,15 @@ pub fn resources_dir_path() -> Path {
#[cfg(not(target_os = "android"))]
pub fn resources_dir_path() -> Path {
- // FIXME: Find a way to not rely on the executable being under `<servo source>/target`.
+ // FIXME: Find a way to not rely on the executable being
+ // under `<servo source>/components/servo/target`
+ // or `<servo source>/components/servo/target/release`.
let mut path = os::self_exe_path().expect("can't get exe path");
path.pop();
+ path.pop();
+ path.pop();
path.push("resources");
- if !path.is_dir() {
+ if !path.is_dir() { // self_exe_path() is probably in .../target/release
path.pop();
path.pop();
path.push("resources");