mirror of
https://github.com/kiwix/kiwix-tools.git
synced 2025-09-24 04:20:56 -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 */
|
/* Try to read the file */
|
||||||
|
libraryPath = isRelativePath(libraryPath) ? computeAbsolutePath(removeLastPathElement(getExecutablePath(), true, false), libraryPath) : libraryPath;
|
||||||
libraryManager.readFile(libraryPath, false);
|
libraryManager.readFile(libraryPath, false);
|
||||||
|
|
||||||
/* SHOW */
|
/* SHOW */
|
||||||
|
@ -566,8 +566,10 @@ int main(int argc, char **argv) {
|
|||||||
for ( itr = libraryPaths.begin(); itr != libraryPaths.end(); ++itr ) {
|
for ( itr = libraryPaths.begin(); itr != libraryPaths.end(); ++itr ) {
|
||||||
if (!(*itr).empty()) {
|
if (!(*itr).empty()) {
|
||||||
bool retVal = false;
|
bool retVal = false;
|
||||||
|
string libraryPath = isRelativePath(*itr) ? computeAbsolutePath(removeLastPathElement(getExecutablePath(), true, false), *itr) : *itr;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
retVal = libraryManager.readFile(*itr, true);
|
retVal = libraryManager.readFile(libraryPath, true);
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
retVal = false;
|
retVal = false;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user