Add LSB install location to DataDir (GH #760)
parent
e5085684ef
commit
174f247c44
|
|
@ -278,6 +278,13 @@ inline std::string DataDir(const std::string& filename)
|
||||||
if (file.is_open())
|
if (file.is_open())
|
||||||
return name;
|
return name;
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef CRYPTOPP_DISABLE_DATA_DIR_SEARCH
|
||||||
|
// Look in /usr/local/bin/share/. This is LSB and default install directory for users.
|
||||||
|
name = std::string("/usr/local/share/cryptopp/") + filename;
|
||||||
|
file.open(name.c_str());
|
||||||
|
if (file.is_open())
|
||||||
|
return name;
|
||||||
|
#endif
|
||||||
#ifndef CRYPTOPP_DISABLE_DATA_DIR_SEARCH
|
#ifndef CRYPTOPP_DISABLE_DATA_DIR_SEARCH
|
||||||
// Finally look in $ORIGIN/../share/. This is likely a Linux install directory for users.
|
// Finally look in $ORIGIN/../share/. This is likely a Linux install directory for users.
|
||||||
name = std::string("../share/cryptopp/") + filename;
|
name = std::string("../share/cryptopp/") + filename;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue