Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Random fixups #5992

Merged
merged 4 commits into from May 12, 2015
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

when finding resource_dir, try exe launch directory

external apps using servo may just have the resources/ in the same place
  • Loading branch information
Mike Blumenkrantz
Mike Blumenkrantz committed May 12, 2015
commit ac6aa9b8b7a658eedfe03b7372adde51a703172a
@@ -25,14 +25,23 @@ pub fn resources_dir_path() -> PathBuf {
// or `<servo source>/components/servo/target/release`.
let mut path = env::current_exe().ok().expect("can't get exe path");
path.pop();
path.pop();
path.pop();
path.pop();
path.push("resources");
if !path.is_dir() { // self_exe_path() is probably in .../target/release
if !path.is_dir() { // resources dir not in same dir as exe?
path.pop();
path.pop();
path.pop();
path.pop();
path.push("resources");
if !path.is_dir() { // self_exe_path() is probably in .../target/release
path.pop();
path.pop();
path.push("resources");
if !path.is_dir() { // self_exe_path() is probably in .../target/release
path.pop();
path.pop();
path.push("resources");
}
}
}
path
}
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.