summaryrefslogtreecommitdiff
path: root/src/envmodule.cpp
diff options
context:
space:
mode:
authorisanae <14251494+isanae@users.noreply.github.com>2019-11-26 06:21:16 -0500
committerisanae <14251494+isanae@users.noreply.github.com>2019-11-26 06:21:16 -0500
commit637188a58bd99e6355ced6c296533c362fb8efd6 (patch)
tree326b28e31cf5603b050d52ea5ac992381b5e119f /src/envmodule.cpp
parent7e1403dd28ec5141e7f4ca3aa6b0bb6e8b0375b0 (diff)
don't log md5 for any system file
Diffstat (limited to 'src/envmodule.cpp')
-rw-r--r--src/envmodule.cpp17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/envmodule.cpp b/src/envmodule.cpp
index 13831631..8d348b5e 100644
--- a/src/envmodule.cpp
+++ b/src/envmodule.cpp
@@ -295,10 +295,19 @@ QDateTime Module::getTimestamp(const VS_FIXEDFILEINFO& fi) const
QString Module::getMD5() const
{
- if (m_path.contains("\\windows\\", Qt::CaseInsensitive)) {
- // don't calculate md5 for system files, it's not really relevant and
- // it takes a while
- return {};
+ static const std::set<QString> ignore = {
+ "\\windows\\",
+ "\\program files\\",
+ "\\program files (x86)\\",
+ "\\programdata\\"
+ };
+
+ // don't calculate md5 for system files, it's not really relevant and
+ // it takes a while
+ for (auto&& i : ignore) {
+ if (m_path.contains(i, Qt::CaseInsensitive)) {
+ return {};
+ }
}
// opening the file