mirror of
https://github.com/kiwix/libkiwix.git
synced 2025-09-14 17:47:43 -04:00
Merge pull request #341 from kiwix/fix-addBookFromPathAndGetId
This commit is contained in:
commit
9c101daad7
@ -175,7 +175,7 @@ std::string Manager::addBookFromPathAndGetId(const std::string& pathToOpen,
|
|||||||
kiwix::Book book;
|
kiwix::Book book;
|
||||||
|
|
||||||
if (this->readBookFromPath(pathToOpen, &book)) {
|
if (this->readBookFromPath(pathToOpen, &book)) {
|
||||||
if (pathToSave != pathToOpen) {
|
if (!pathToSave.empty() && pathToSave != pathToOpen) {
|
||||||
book.setPath(isRelativePath(pathToSave)
|
book.setPath(isRelativePath(pathToSave)
|
||||||
? computeAbsolutePath(
|
? computeAbsolutePath(
|
||||||
removeLastPathElement(writableLibraryPath),
|
removeLastPathElement(writableLibraryPath),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user