mirror of
https://github.com/kiwix/kiwix-tools.git
synced 2025-09-23 12:00:21 -04:00
+ fix kiwix-mange and kiwix-serve to be able to deal with relative library paths
This commit is contained in:
parent
f8628c9fe4
commit
a9d1e672f0
@ -86,6 +86,7 @@ int main(int argc, char **argv) {
|
||||
}
|
||||
|
||||
/* Try to read the file */
|
||||
libraryPath = isRelativePath(libraryPath) ? computeAbsolutePath(removeLastPathElement(getExecutablePath(), true, false), libraryPath) : libraryPath;
|
||||
libraryManager.readFile(libraryPath, false);
|
||||
|
||||
/* SHOW */
|
||||
|
@ -566,8 +566,10 @@ int main(int argc, char **argv) {
|
||||
for ( itr = libraryPaths.begin(); itr != libraryPaths.end(); ++itr ) {
|
||||
if (!(*itr).empty()) {
|
||||
bool retVal = false;
|
||||
string libraryPath = isRelativePath(*itr) ? computeAbsolutePath(removeLastPathElement(getExecutablePath(), true, false), *itr) : *itr;
|
||||
|
||||
try {
|
||||
retVal = libraryManager.readFile(*itr, true);
|
||||
retVal = libraryManager.readFile(libraryPath, true);
|
||||
} catch (...) {
|
||||
retVal = false;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user