summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTannin <devnull@localhost>2015-06-20 13:55:29 +0200
committerTannin <devnull@localhost>2015-06-20 13:55:29 +0200
commitaa21a192cbaff7fa7639d40851f7afc57475e8b0 (patch)
tree5949e31f00187736389f1752035cd3498d662fed
parentd4d7ce1fd3167e957ab45e9e1dd280744b02ee76 (diff)
bugfix: fix in changeset f4c306711386 wasn't fully working
-rw-r--r--src/modinfo.cpp23
1 files changed, 12 insertions, 11 deletions
diff --git a/src/modinfo.cpp b/src/modinfo.cpp
index feb3a96c..3c721a2c 100644
--- a/src/modinfo.cpp
+++ b/src/modinfo.cpp
@@ -431,6 +431,9 @@ void ModInfoWithConflictInfo::doConflictCheck() const
}
std::wstring name = ToWString(this->name());
+
+ m_CurrentConflictState = CONFLICT_NONE;
+
if ((*m_DirectoryStructure)->originExists(name)) {
FilesOrigin &origin = (*m_DirectoryStructure)->getOriginByName(name);
std::vector<FileEntry::Ptr> files = origin.getFiles();
@@ -465,18 +468,16 @@ void ModInfoWithConflictInfo::doConflictCheck() const
}
m_LastConflictCheck = QTime::currentTime();
- if (!providesAnything)
- m_CurrentConflictState = CONFLICT_REDUNDANT;
- else if (!m_OverwriteList.empty() && !m_OverwrittenList.empty())
- m_CurrentConflictState = CONFLICT_MIXED;
- else if (!m_OverwriteList.empty())
- m_CurrentConflictState = CONFLICT_OVERWRITE;
- else if (!m_OverwrittenList.empty()) {
- m_CurrentConflictState = CONFLICT_OVERWRITTEN;
+ if (files.size() != 0) {
+ if (!providesAnything)
+ m_CurrentConflictState = CONFLICT_REDUNDANT;
+ else if (!m_OverwriteList.empty() && !m_OverwrittenList.empty())
+ m_CurrentConflictState = CONFLICT_MIXED;
+ else if (!m_OverwriteList.empty())
+ m_CurrentConflictState = CONFLICT_OVERWRITE;
+ else if (!m_OverwrittenList.empty())
+ m_CurrentConflictState = CONFLICT_OVERWRITTEN;
}
- else m_CurrentConflictState = CONFLICT_NONE;
- } else {
- m_CurrentConflictState = CONFLICT_NONE;
}
}