3
0
Fork 0

+ fix kiwix-mange and kiwix-serve to be able to deal with relative library paths

small_fixes
kelson42 11 years ago
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…
Cancel
Save