From d26c4e8ea2c2450b4abedf965803a1046cb55625 Mon Sep 17 00:00:00 2001 From: LostDragonist Date: Sat, 9 Mar 2019 20:47:10 -0600 Subject: Fix conflict detection concerning overwrite --- src/directoryrefresher.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/directoryrefresher.cpp') diff --git a/src/directoryrefresher.cpp b/src/directoryrefresher.cpp index 8b6c55e3..3ce4691b 100644 --- a/src/directoryrefresher.cpp +++ b/src/directoryrefresher.cpp @@ -178,10 +178,9 @@ void DirectoryRefresher::refresh() std::wstring dataDirectory = QDir::toNativeSeparators(game->dataDirectory().absolutePath()).toStdWString(); m_DirectoryStructure->addFromOrigin(L"data", dataDirectory, 0); - // TODO what was the point of having the priority in this tuple? the list is already sorted by priority + std::sort(m_Mods.begin(), m_Mods.end(), [](auto lhs, auto rhs){return lhs.priority < rhs.priority;}); auto iter = m_Mods.begin(); - //TODO i is the priority here, where higher = more important. the input vector is also sorted by priority but inverted! for (int i = 1; iter != m_Mods.end(); ++iter, ++i) { try { addModToStructure(m_DirectoryStructure, iter->modName, i, iter->absolutePath, iter->stealFiles, iter->archives); -- cgit v1.3.1