From 76f63c3569900baffea95ec54de3e9d6c9567fb8 Mon Sep 17 00:00:00 2001 From: Paul Rouget Date: Mon, 15 Feb 2016 23:06:40 +0800 Subject: [PATCH] Follow executable symlink to resolve resources directory --- components/util/resource_files.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/util/resource_files.rs b/components/util/resource_files.rs index 67ae9f6550a..dcb9646f42c 100644 --- a/components/util/resource_files.rs +++ b/components/util/resource_files.rs @@ -34,6 +34,8 @@ pub fn resources_dir_path() -> PathBuf { // under `[/$target_triple]/target/debug` // or `[/$target_triple]/target/release`. let mut path = env::current_exe().expect("can't get exe path"); + // Follow symlink + path = path.canonicalize().expect("path does not exist"); path.pop(); path.push("resources"); if !path.is_dir() { // resources dir not in same dir as exe?