mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-17 22:18:05 -06:00
committed by
GitHub
parent
d02b01c733
commit
222d265eec
@@ -31,6 +31,7 @@
|
|||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QMetaObject>
|
#include <QMetaObject>
|
||||||
|
|
||||||
|
#include "base/logger.h"
|
||||||
#include "base/utils/fs.h"
|
#include "base/utils/fs.h"
|
||||||
#include "base/utils/io.h"
|
#include "base/utils/io.h"
|
||||||
|
|
||||||
@@ -41,7 +42,11 @@ AsyncFileStorage::AsyncFileStorage(const Path &storageFolderPath, QObject *paren
|
|||||||
Q_ASSERT(m_storageDir.isAbsolute());
|
Q_ASSERT(m_storageDir.isAbsolute());
|
||||||
|
|
||||||
if (!Utils::Fs::mkpath(m_storageDir))
|
if (!Utils::Fs::mkpath(m_storageDir))
|
||||||
throw AsyncFileStorageError(tr("Could not create directory '%1'.").arg(m_storageDir.toString()));
|
{
|
||||||
|
const QString errorMessage = tr("Could not create directory '%1'.").arg(m_storageDir.toString());
|
||||||
|
LogMsg(errorMessage, Log::CRITICAL);
|
||||||
|
qFatal() << errorMessage;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void AsyncFileStorage::store(const Path &filePath, const QByteArray &data)
|
void AsyncFileStorage::store(const Path &filePath, const QByteArray &data)
|
||||||
|
|||||||
@@ -30,15 +30,8 @@
|
|||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
|
||||||
#include "base/exceptions.h"
|
|
||||||
#include "base/path.h"
|
#include "base/path.h"
|
||||||
|
|
||||||
class AsyncFileStorageError final : public RuntimeError
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
using RuntimeError::RuntimeError;
|
|
||||||
};
|
|
||||||
|
|
||||||
class AsyncFileStorage final : public QObject
|
class AsyncFileStorage final : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|||||||
Reference in New Issue
Block a user