[Scummvm-git-logs] scummvm master -> d62202801a0ea851157b412e48900a478d799d56
antoniou79
a.antoniou79 at gmail.com
Tue Jul 13 13:55:33 UTC 2021
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
d62202801a GUI: Check for writable for save game path
Commit: d62202801a0ea851157b412e48900a478d799d56
https://github.com/scummvm/scummvm/commit/d62202801a0ea851157b412e48900a478d799d56
Author: antoniou (a.antoniou79 at gmail.com)
Date: 2021-07-13T16:51:56+03:00
Commit Message:
GUI: Check for writable for save game path
This is done in Global Options, but it was skipped here in Game domain scope
This resulted in allowing bad paths (without write access) in this field
Changed paths:
gui/editgamedialog.cpp
diff --git a/gui/editgamedialog.cpp b/gui/editgamedialog.cpp
index 9df5c3579e..8dd5099773 100644
--- a/gui/editgamedialog.cpp
+++ b/gui/editgamedialog.cpp
@@ -616,7 +616,13 @@ void EditGameDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 dat
if (browser.runModal() > 0) {
// User made his choice...
Common::FSNode dir(browser.getResult());
- _savePathWidget->setLabel(dir.getPath());
+ if (dir.isWritable()) {
+ _savePathWidget->setLabel(dir.getPath());
+ } else {
+ MessageDialog error(_("The chosen directory cannot be written to. Please select another one."));
+ error.runModal();
+ return;
+ }
#if defined(USE_CLOUD) && defined(USE_LIBCURL)
MessageDialog warningMessage(_("Saved games sync feature doesn't work with non-default directories. If you want your saved games to sync, use default directory."));
warningMessage.runModal();
More information about the Scummvm-git-logs
mailing list