summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikaël Capelle <capelle.mikael@gmail.com>2020-05-07 19:18:58 +0200
committerMikaël Capelle <capelle.mikael@gmail.com>2020-05-07 19:18:58 +0200
commit411b73e0aa68899d04b309b443aebf8de4b1a057 (patch)
treecad65d68f75e90a46e8ed05d5353f8b3973d7fc7
parentf405a51bf63373403cb0682dff243a90219af2bb (diff)
Fix issue with some archives not being extracted correctly.
-rw-r--r--src/archivefiletree.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/archivefiletree.cpp b/src/archivefiletree.cpp
index ffee7612..77b17112 100644
--- a/src/archivefiletree.cpp
+++ b/src/archivefiletree.cpp
@@ -158,7 +158,7 @@ protected:
// We know that the files are sorted:
QString currentName = "";
- int currentIndex;
+ int currentIndex = -1;
std::vector<File> currentFiles;
for (auto& p : m_Files) {
@@ -167,7 +167,6 @@ protected:
// one for a/b while we would want the one for a, but we correct that later):
if (currentName == "") {
currentName = std::get<0>(p)[0];
- currentIndex = std::get<2>(p);
}
// If the name is different, we need to create a directory from what we have
@@ -178,7 +177,7 @@ protected:
currentFiles.clear(); // Back to a valid state.
// Retrieve the next index:
- currentIndex = std::get<2>(p);
+ currentIndex = -1;
}
// We can always override the current name: