diff options
author | Trial97 <alexandru.tripon97@gmail.com> | 2023-07-08 00:14:05 +0300 |
---|---|---|
committer | Trial97 <alexandru.tripon97@gmail.com> | 2023-07-08 00:14:05 +0300 |
commit | bc2940e16a8a7839a120a45be9232b5adebbe751 (patch) | |
tree | 5952ce6503d0a084b7b44c16441caf56999ce303 /launcher/FileSystem.cpp | |
parent | cf2393a50966f8dc84720f7d44538b0cb7649d46 (diff) | |
parent | 1131038fdb0093ef9c732b18d699b6176fc6d82c (diff) | |
download | PrismLauncher-bc2940e16a8a7839a120a45be9232b5adebbe751.tar.gz PrismLauncher-bc2940e16a8a7839a120a45be9232b5adebbe751.tar.bz2 PrismLauncher-bc2940e16a8a7839a120a45be9232b5adebbe751.zip |
Merge branch 'develop' of https://github.com/PrismLauncher/PrismLauncher into settings
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
Diffstat (limited to 'launcher/FileSystem.cpp')
-rw-r--r-- | launcher/FileSystem.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/launcher/FileSystem.cpp b/launcher/FileSystem.cpp index 3ce8dd2c..812d45eb 100644 --- a/launcher/FileSystem.cpp +++ b/launcher/FileSystem.cpp @@ -36,6 +36,7 @@ */ #include "FileSystem.h" +#include <QPair> #include "BuildConfig.h" @@ -246,6 +247,7 @@ bool copy::operator()(const QString& offset, bool dryRun) { using copy_opts = fs::copy_options; m_copied = 0; // reset counter + m_failedPaths.clear(); // NOTE always deep copy on windows. the alternatives are too messy. #if defined Q_OS_WIN32 @@ -277,6 +279,9 @@ bool copy::operator()(const QString& offset, bool dryRun) qWarning() << "Failed to copy files:" << QString::fromStdString(err.message()); qDebug() << "Source file:" << src_path; qDebug() << "Destination file:" << dst_path; + m_failedPaths.append(dst_path); + emit copyFailed(relative_dst_path); + return; } m_copied++; emit fileCopied(relative_dst_path); @@ -1077,6 +1082,7 @@ bool clone::operator()(const QString& offset, bool dryRun) } m_cloned = 0; // reset counter + m_failedClones.clear(); auto src = PathCombine(m_src.absolutePath(), offset); auto dst = PathCombine(m_dst.absolutePath(), offset); @@ -1097,6 +1103,9 @@ bool clone::operator()(const QString& offset, bool dryRun) qDebug() << "Failed to clone files: error" << err.value() << "message" << QString::fromStdString(err.message()); qDebug() << "Source file:" << src_path; qDebug() << "Destination file:" << dst_path; + m_failedClones.append(qMakePair(src_path, dst_path)); + emit cloneFailed(src_path, dst_path); + return; } m_cloned++; emit fileCloned(src_path, dst_path); |