mirror of
https://github.com/kiwix/kiwix-desktop.git
synced 2025-08-03 12:46:29 -04:00
Option to disable sandbox on Windows network drive
This commit is contained in:
parent
32f0ee581e
commit
26f610c830
@ -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?"
|
||||
}
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user