mirror of
https://github.com/kiwix/kiwix-tools.git
synced 2025-09-23 03:52:35 -04:00
Fix kiwix-mange problem with relative paths
This commit is contained in:
parent
96f0fff54d
commit
2458c22e09
@ -89,7 +89,9 @@ int main(int argc, char **argv) {
|
||||
}
|
||||
|
||||
/* Try to read the file */
|
||||
libraryPath = isRelativePath(libraryPath) ? computeAbsolutePath(removeLastPathElement(getExecutablePath(), true, false), libraryPath) : libraryPath;
|
||||
libraryPath = isRelativePath(libraryPath) ?
|
||||
computeAbsolutePath(getCurrentDirectory(), libraryPath) :
|
||||
libraryPath;
|
||||
libraryManager.readFile(libraryPath, false);
|
||||
|
||||
/* SHOW */
|
||||
@ -201,8 +203,9 @@ int main(int argc, char **argv) {
|
||||
}
|
||||
|
||||
/* Rewrite the library file */
|
||||
if (action == REMOVE || action == ADD)
|
||||
if (action == REMOVE || action == ADD) {
|
||||
libraryManager.writeFile(libraryPath);
|
||||
}
|
||||
|
||||
exit(0);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user