changed settings paths
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
#pragma once
|
||||
|
||||
#include <QDir>
|
||||
#include <QString>
|
||||
|
||||
namespace chatterino {
|
||||
namespace util {
|
||||
|
||||
// https://stackoverflow.com/a/13014491
|
||||
static QString combinePath(const QString &a, const QString &b)
|
||||
{
|
||||
return QDir::cleanPath(a + QDir::separator() + b);
|
||||
}
|
||||
|
||||
} // namespace util
|
||||
} // namespace chatterino
|
||||
@@ -30,7 +30,7 @@ void NetworkRequest::Data::writeToCache(const QByteArray &bytes)
|
||||
if (this->useQuickLoadCache) {
|
||||
auto app = getApp();
|
||||
|
||||
QFile cachedFile(app->paths->cacheFolderPath + "/" + this->getHash());
|
||||
QFile cachedFile(app->paths->cacheDirectory + "/" + this->getHash());
|
||||
|
||||
if (cachedFile.open(QIODevice::WriteOnly)) {
|
||||
cachedFile.write(bytes);
|
||||
|
||||
@@ -183,7 +183,7 @@ public:
|
||||
if (this->data.useQuickLoadCache) {
|
||||
auto app = getApp();
|
||||
|
||||
QFile cachedFile(app->paths->cacheFolderPath + "/" + this->data.getHash());
|
||||
QFile cachedFile(app->paths->cacheDirectory + "/" + this->data.getHash());
|
||||
|
||||
if (cachedFile.exists()) {
|
||||
if (cachedFile.open(QIODevice::ReadOnly)) {
|
||||
@@ -329,7 +329,7 @@ private:
|
||||
if (this->data.useQuickLoadCache) {
|
||||
auto app = getApp();
|
||||
|
||||
QFile cachedFile(app->paths->cacheFolderPath + "/" + this->data.getHash());
|
||||
QFile cachedFile(app->paths->cacheDirectory + "/" + this->data.getHash());
|
||||
|
||||
if (cachedFile.exists()) {
|
||||
if (cachedFile.open(QIODevice::ReadOnly)) {
|
||||
|
||||
Reference in New Issue
Block a user