diff options
author | Jeffrey Walton <noloader@gmail.com> | 2019-01-02 01:22:23 -0500 |
---|---|---|
committer | Jeffrey Walton <noloader@gmail.com> | 2019-01-02 01:22:23 -0500 |
commit | 174f247c446cb8ab53f856d77e327a0ac26b6250 (patch) | |
tree | a4d1561b7f918ec465eb643abe2aaec4d746091e /validate.h | |
parent | e5085684efe71cb48ccb4385f40cd3cc62d5f66c (diff) | |
download | cryptopp-git-174f247c446cb8ab53f856d77e327a0ac26b6250.tar.gz |
Add LSB install location to DataDir (GH #760)
Diffstat (limited to 'validate.h')
-rw-r--r-- | validate.h | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -279,6 +279,13 @@ inline std::string DataDir(const std::string& filename) return name;
#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
// Finally look in $ORIGIN/../share/. This is likely a Linux install directory for users.
name = std::string("../share/cryptopp/") + filename;
file.open(name.c_str());
|