diff options
| author | isanae <14251494+isanae@users.noreply.github.com> | 2019-11-26 06:21:16 -0500 |
|---|---|---|
| committer | isanae <14251494+isanae@users.noreply.github.com> | 2019-11-26 06:21:16 -0500 |
| commit | 637188a58bd99e6355ced6c296533c362fb8efd6 (patch) | |
| tree | 326b28e31cf5603b050d52ea5ac992381b5e119f /src/envmodule.cpp | |
| parent | 7e1403dd28ec5141e7f4ca3aa6b0bb6e8b0375b0 (diff) | |
don't log md5 for any system file
Diffstat (limited to 'src/envmodule.cpp')
| -rw-r--r-- | src/envmodule.cpp | 17 |
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 |
