summaryrefslogtreecommitdiffstats
path: root/logic/net
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2015-10-05 01:47:27 +0200
committerPetr Mrázek <peterix@gmail.com>2015-10-05 01:47:27 +0200
commitf93f867c3da084c6d6c5e3ed23896609cff0e692 (patch)
tree3234c54d9aefb5566afc0c8ff52874e20ab35304 /logic/net
parent7459eb627c97d27ef6e12cdededa48e1ff03d533 (diff)
downloadMultiMC-f93f867c3da084c6d6c5e3ed23896609cff0e692.tar
MultiMC-f93f867c3da084c6d6c5e3ed23896609cff0e692.tar.gz
MultiMC-f93f867c3da084c6d6c5e3ed23896609cff0e692.tar.lz
MultiMC-f93f867c3da084c6d6c5e3ed23896609cff0e692.tar.xz
MultiMC-f93f867c3da084c6d6c5e3ed23896609cff0e692.zip
NOISSUE dissolve util library
Diffstat (limited to 'logic/net')
-rw-r--r--logic/net/CacheDownload.cpp4
-rw-r--r--logic/net/HttpMetaCache.cpp5
-rw-r--r--logic/net/MD5EtagDownload.cpp4
-rw-r--r--logic/net/NetJob.cpp1
4 files changed, 6 insertions, 8 deletions
diff --git a/logic/net/CacheDownload.cpp b/logic/net/CacheDownload.cpp
index b125a3d9..1d48170a 100644
--- a/logic/net/CacheDownload.cpp
+++ b/logic/net/CacheDownload.cpp
@@ -14,13 +14,13 @@
*/
#include "CacheDownload.h"
-#include <pathutils.h>
#include <QCryptographicHash>
#include <QFileInfo>
#include <QDateTime>
#include <QDebug>
#include "Env.h"
+#include <FileSystem.h>
CacheDownload::CacheDownload(QUrl url, MetaEntryPtr entry)
: NetAction(), md5sum(QCryptographicHash::Md5)
@@ -44,7 +44,7 @@ void CacheDownload::start()
m_output_file.reset(new QSaveFile(m_target_path));
// if there already is a file and md5 checking is in effect and it can be opened
- if (!ensureFilePathExists(m_target_path))
+ if (!FS::ensureFilePathExists(m_target_path))
{
qCritical() << "Could not create folder for " + m_target_path;
m_status = Job_Failed;
diff --git a/logic/net/HttpMetaCache.cpp b/logic/net/HttpMetaCache.cpp
index 977e3a90..3d6aef0d 100644
--- a/logic/net/HttpMetaCache.cpp
+++ b/logic/net/HttpMetaCache.cpp
@@ -16,7 +16,6 @@
#include "Env.h"
#include "HttpMetaCache.h"
#include "FileSystem.h"
-#include <pathutils.h>
#include <QFileInfo>
#include <QFile>
@@ -33,7 +32,7 @@
QString MetaEntry::getFullPath()
{
// FIXME: make local?
- return PathCombine(ENV.metacache()->getBasePath(base), path);
+ return FS::PathCombine(ENV.metacache()->getBasePath(base), path);
}
HttpMetaCache::HttpMetaCache(QString path) : QObject()
@@ -77,7 +76,7 @@ MetaEntryPtr HttpMetaCache::resolveEntry(QString base, QString resource_path,
}
auto &selected_base = m_entries[base];
- QString real_path = PathCombine(selected_base.base_path, resource_path);
+ QString real_path = FS::PathCombine(selected_base.base_path, resource_path);
QFileInfo finfo(real_path);
// is the file really there? if not -> stale
diff --git a/logic/net/MD5EtagDownload.cpp b/logic/net/MD5EtagDownload.cpp
index 7593c87e..3b4d5dcd 100644
--- a/logic/net/MD5EtagDownload.cpp
+++ b/logic/net/MD5EtagDownload.cpp
@@ -15,7 +15,7 @@
#include "Env.h"
#include "MD5EtagDownload.h"
-#include <pathutils.h>
+#include <FileSystem.h>
#include <QCryptographicHash>
#include <QDebug>
@@ -55,7 +55,7 @@ void MD5EtagDownload::start()
// no expected md5. we use the local md5sum as an ETag
}
}
- if (!ensureFilePathExists(filename))
+ if (!FS::ensureFilePathExists(filename))
{
emit failed(m_index_within_job);
return;
diff --git a/logic/net/NetJob.cpp b/logic/net/NetJob.cpp
index 52307e2a..76c61c35 100644
--- a/logic/net/NetJob.cpp
+++ b/logic/net/NetJob.cpp
@@ -14,7 +14,6 @@
*/
#include "NetJob.h"
-#include "pathutils.h"
#include "MD5EtagDownload.h"
#include "ByteArrayDownload.h"
#include "CacheDownload.h"