Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
libcifpp
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
libcifpp
Commits
3bb21c54
Unverified
Commit
3bb21c54
authored
Mar 14, 2024
by
Maarten L. Hekkelman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Try one more location to locate resources
parent
6d1be23a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
src/utilities.cpp
+15
-0
No files found.
src/utilities.cpp
View file @
3bb21c54
...
@@ -877,6 +877,21 @@ class resource_pool
...
@@ -877,6 +877,21 @@ class resource_pool
resource_pool
::
resource_pool
()
resource_pool
::
resource_pool
()
{
{
// directories are searched in reverse order
// As a last resort, try the location that might have been
// used during installation, works only when running on an
// OS with a proc file system.
std
::
error_code
ec
;
if
(
auto
exefile
=
fs
::
read_symlink
(
"/proc/self/exe"
,
ec
);
not
ec
and
exefile
.
parent_path
().
filename
()
==
"bin"
)
{
auto
install_prefix
=
exefile
.
parent_path
().
parent_path
();
auto
data_dir
=
install_prefix
/
"share"
/
"libcifpp"
;
if
(
fs
::
exists
(
data_dir
,
ec
))
pushDir
(
data_dir
);
}
#if defined(DATA_DIR)
#if defined(DATA_DIR)
pushDir
(
DATA_DIR
);
pushDir
(
DATA_DIR
);
#endif
#endif
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment