diff options
| author | Carl Hetherington <cth@carlh.net> | 2024-06-14 19:54:27 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2024-06-23 19:51:28 +0200 |
| commit | dbab45a8358d8a48043718872f2649fc24b1d9ef (patch) | |
| tree | 78bc7a27cdb5dcc6791186b3a2cff75ea1badf33 /src/lib/cross_linux.cc | |
| parent | 145d9aeb57a9768615d1331f25c30bc365df905e (diff) | |
Fall back to the source directory if we're not running an installed DoM.
This is useful for the web pages as they are in a subdirectory called
web in either version of resouces_path().
Diffstat (limited to 'src/lib/cross_linux.cc')
| -rw-r--r-- | src/lib/cross_linux.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lib/cross_linux.cc b/src/lib/cross_linux.cc index 015158aa8..be3233b32 100644 --- a/src/lib/cross_linux.cc +++ b/src/lib/cross_linux.cc @@ -85,7 +85,12 @@ cpu_info () boost::filesystem::path resources_path () { - return directory_containing_executable().parent_path() / "share" / "dcpomatic2"; + auto installed = directory_containing_executable().parent_path() / "share" / "dcpomatic2"; + if (boost::filesystem::exists(installed)) { + return installed; + } + + return directory_containing_executable().parent_path().parent_path().parent_path(); } |
