diff options
author | David Corrales | 2007-06-14 18:40:27 +0000 |
---|---|---|
committer | David Corrales | 2007-06-14 18:40:27 +0000 |
commit | e7aa6b996b54cec0a3dc2cb91feb4f1529cc27e5 (patch) | |
tree | fa86bb659f1debc96be51b4cccd087f360f8fd54 /gui | |
parent | 3b96c7fad54ff7f5000667be494e50e7ca11e69a (diff) | |
download | scummvm-rg350-e7aa6b996b54cec0a3dc2cb91feb4f1529cc27e5.tar.gz scummvm-rg350-e7aa6b996b54cec0a3dc2cb91feb4f1529cc27e5.tar.bz2 scummvm-rg350-e7aa6b996b54cec0a3dc2cb91feb4f1529cc27e5.zip |
Fixed a TODO about checking that the savegames path is writable.
svn-id: r27403
Diffstat (limited to 'gui')
-rw-r--r-- | gui/options.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/gui/options.cpp b/gui/options.cpp index 4d6cadfdef..76bec036ad 100644 --- a/gui/options.cpp +++ b/gui/options.cpp @@ -27,6 +27,7 @@ #include "gui/themebrowser.h" #include "gui/chooser.h" #include "gui/eval.h" +#include "gui/message.h" #include "gui/newgui.h" #include "gui/options.h" #include "gui/PopUpWidget.h" @@ -821,9 +822,15 @@ void GlobalOptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint3 if (browser.runModal() > 0) { // User made his choice... FilesystemNode dir(browser.getResult()); - _savePath->setLabel(dir.getPath()); + if(dir.isWritable()) + { + _savePath->setLabel(dir.getPath()); + } else { + MessageDialog error("The chosen directory cannot be written to. Please select another one."); + error.runModal(); + return; + } draw(); - // TODO - we should check if the directory is writeable before accepting it } break; } |