aboutsummaryrefslogtreecommitdiff
path: root/launcher/modplatform/helpers/HashUtils.cpp
diff options
context:
space:
mode:
authorSefa Eyeoglu <contact@scrumplex.net>2022-11-10 14:34:15 +0100
committerGitHub <noreply@github.com>2022-11-10 14:34:15 +0100
commit392452d422be517b82fd4cc35087b44df16fc3f7 (patch)
tree2696a095e889a6bab49de4dc95f78ce81c7e97a6 /launcher/modplatform/helpers/HashUtils.cpp
parente6d057fe6da1209b85af2e8385a5c1251af7e8d4 (diff)
parent9ad6eb11a37815f7aab89163184d519a2183f4f2 (diff)
downloadPrismLauncher-392452d422be517b82fd4cc35087b44df16fc3f7.tar.gz
PrismLauncher-392452d422be517b82fd4cc35087b44df16fc3f7.tar.bz2
PrismLauncher-392452d422be517b82fd4cc35087b44df16fc3f7.zip
Merge pull request #397 from flowln/windows_mod_updater_fixes_maybe
Fixes https://github.com/PrismLauncher/PrismLauncher/issues/226
Diffstat (limited to 'launcher/modplatform/helpers/HashUtils.cpp')
-rw-r--r--launcher/modplatform/helpers/HashUtils.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/launcher/modplatform/helpers/HashUtils.cpp b/launcher/modplatform/helpers/HashUtils.cpp
index a7bbaba5..b18c87af 100644
--- a/launcher/modplatform/helpers/HashUtils.cpp
+++ b/launcher/modplatform/helpers/HashUtils.cpp
@@ -4,6 +4,7 @@
#include <QFile>
#include "FileSystem.h"
+#include "StringUtils.h"
#include <MurmurHash2.h>
@@ -66,7 +67,7 @@ void FlameHasher::executeTask()
// CF-specific
auto should_filter_out = [](char c) { return (c == 9 || c == 10 || c == 13 || c == 32); };
- std::ifstream file_stream(m_path.toStdString(), std::ifstream::binary);
+ std::ifstream file_stream(StringUtils::toStdString(m_path), std::ifstream::binary);
// TODO: This is very heavy work, but apparently QtConcurrent can't use move semantics, so we can't boop this to another thread.
// How do we make this non-blocking then?
m_hash = QString::number(MurmurHash2(std::move(file_stream), 4 * MiB, should_filter_out));