diff --git a/resources/i18n/en.json b/resources/i18n/en.json index b0e3d06..a46fd2f 100644 --- a/resources/i18n/en.json +++ b/resources/i18n/en.json @@ -177,5 +177,6 @@ "export-reading-list": "Export reading list", "export-reading-list-error": "An error has occured during export of the reading list.", "import-reading-list": "Import reading list", - "import-reading-list-error": "An error has occured during import of the reading list." + "import-reading-list-error": "An error has occured during import of the reading list.", + "disable-sandbox": "Application was launched from a network drive. This is known to cause compatibility issues due to the sandbox. Do you want to take the risks and disable it?" } diff --git a/src/main.cpp b/src/main.cpp index 2992455..e8004db 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -26,8 +26,9 @@ int main(int argc, char *argv[]) std::string driveLetter = kiwix::getExecutablePath().substr(0, 3); UINT driveType = GetDriveTypeA(driveLetter.c_str()); if(driveType == DRIVE_REMOTE) { - qputenv("QTWEBENGINE_CHROMIUM_FLAGS", QByteArray("--no-sandbox")); - qInfo() << "Disabled sandbox"; + int msgboxID = MessageBoxA(NULL, gt("disable-sandbox"), gt("about-kiwix-desktop-title"), MB_YESNO | MB_ICONQUESTION); + if (msgboxID == IDYES) + qputenv("QTWEBENGINE_CHROMIUM_FLAGS", QByteArray("--no-sandbox")); } #endif #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)