mirror of
https://github.com/kiwix/kiwix-desktop.git
synced 2025-09-22 11:37:56 -04:00
Ensure that we use the right path separator when opening a book.
This commit is contained in:
parent
565e332de2
commit
963c0066c2
@ -8,6 +8,7 @@
|
||||
#include <QDebug>
|
||||
#include <QUrlQuery>
|
||||
#include <QUrl>
|
||||
#include <QDir>
|
||||
|
||||
ContentManager::ContentManager(Library* library, kiwix::Downloader* downloader, QObject *parent)
|
||||
: QObject(parent),
|
||||
@ -116,7 +117,8 @@ QStringList ContentManager::updateDownloadInfos(QString id, const QStringList &k
|
||||
|
||||
d->updateStatus(true);
|
||||
if (d->getStatus() == kiwix::Download::K_COMPLETE) {
|
||||
b.setPath(d->getPath());
|
||||
QString tmp(QString::fromStdString(d->getPath()));
|
||||
b.setPath(QDir::toNativeSeparators(tmp).toStdString());
|
||||
b.setDownloadId("");
|
||||
mp_library->save();
|
||||
emit(mp_library->booksChanged());
|
||||
|
@ -123,6 +123,7 @@ void KiwixApp::openZimFile(const QString &zimfile)
|
||||
tr("Open Zim"),
|
||||
QString(),
|
||||
"ZimFile (*.zim*)");
|
||||
_zimfile = QDir::toNativeSeparators(_zimfile);
|
||||
}
|
||||
if (_zimfile.isEmpty()) {
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user