diff options
| author | isanae <14251494+isanae@users.noreply.github.com> | 2019-07-17 12:23:26 -0400 |
|---|---|---|
| committer | isanae <14251494+isanae@users.noreply.github.com> | 2019-07-22 07:33:38 -0400 |
| commit | 35ae099d3fcc6c5b42fbd8d10e5efc2427bcf2dc (patch) | |
| tree | 9e5914e2a26f24ef029d9b3ec89c70bc6138b28e /src/main.cpp | |
| parent | eb190380e3044900a30ba41c81a23d813fd708e9 (diff) | |
check for files likely to be eaten by an AV on startup
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp index 6b4280b4..15d36428 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -505,7 +505,7 @@ void dumpEnvironment() void dumpSettings(QSettings& settings) { - static QStringList ignore({ + static const QStringList ignore({ "username", "password", "nexus_api_key" }); @@ -524,11 +524,33 @@ void dumpSettings(QSettings& settings) settings.endGroup(); } +void sanityChecks() +{ + // files that are likely to be eaten + static const QStringList files({ + "helper.exe", "nxmhandler.exe", + "usvfs_proxy_x64.exe", "usvfs_proxy_x86.exe", + "usvfs_x64.dll", "usvfs_x86.dll" + }); + + const auto dir = QCoreApplication::applicationDirPath(); + + for (const auto& name : files) { + const QFileInfo file(dir + QDir::separator() + name); + if (!file.exists()) { + log::warn( + "'{}' seems to be missing, an antivirus may have deleted it", + file.absoluteFilePath()); + } + } +} + + int runApplication(MOApplication &application, SingleInstance &instance, const QString &splashPath) { log::info( - "Starting Mod Organizer version {} revision {} in {}", + "starting Mod Organizer version {} revision {} in {}", getVersionDisplayString(), GITID, QCoreApplication::applicationDirPath()); preloadSsl(); @@ -565,6 +587,7 @@ int runApplication(MOApplication &application, SingleInstance &instance, dumpEnvironment(); dumpSettings(initSettings); + sanityChecks(); log::debug("initializing core"); OrganizerCore organizer(settings); |
