summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2013-12-13 02:48:31 +0100
committerPetr Mrázek <peterix@gmail.com>2013-12-13 02:48:31 +0100
commit7d20e2478a2166caccd92c3af4b19d80383cce2b (patch)
tree44a2df3937c4282ff9c7bc94dc280aa1ceea17be
parent39aebddf3b6b93091aa8494f74690b4a819593d1 (diff)
parenta954fc1a3291d7f6e984b42ba71508d521d7d945 (diff)
downloadMultiMC-7d20e2478a2166caccd92c3af4b19d80383cce2b.tar
MultiMC-7d20e2478a2166caccd92c3af4b19d80383cce2b.tar.gz
MultiMC-7d20e2478a2166caccd92c3af4b19d80383cce2b.tar.lz
MultiMC-7d20e2478a2166caccd92c3af4b19d80383cce2b.tar.xz
MultiMC-7d20e2478a2166caccd92c3af4b19d80383cce2b.zip
Merge branch 'develop' of github.com:MultiMC/MultiMC5 into develop
-rw-r--r--logic/updater/DownloadUpdateTask.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/logic/updater/DownloadUpdateTask.cpp b/logic/updater/DownloadUpdateTask.cpp
index 3fe24482..250092ed 100644
--- a/logic/updater/DownloadUpdateTask.cpp
+++ b/logic/updater/DownloadUpdateTask.cpp
@@ -242,10 +242,18 @@ void DownloadUpdateTask::processFileLists()
for (VersionFileEntry newEntry : m_nVersionFileList)
{
if (newEntry.path == entry.path)
- continue;
+ {
+ QLOG_DEBUG() << "Not deleting" << entry.path << "because it is still present in the new version.";
+ goto SkipFile;
+ }
}
// If the loop reaches the end, we didn't find a match. Delete the file.
m_operationList.append(UpdateOperation::DeleteOp(entry.path));
+
+SkipFile:
+ // We goto here from the inner loop if we find an entry that has a corresponding entry in the new version's file list.
+ // This allows us to effectively continue the outer loop from the inner loop.
+ // In this case, goto is the more readable option.
}
// Create a network job for downloading files.