mirror of
https://github.com/libretro/scummvm.git
synced 2025-04-16 21:50:21 +00:00
Fixed a TODO about checking that the savegames path is writable.
svn-id: r27403
This commit is contained in:
parent
3b96c7fad5
commit
e7aa6b996b
@ -27,6 +27,7 @@
|
|||||||
#include "gui/themebrowser.h"
|
#include "gui/themebrowser.h"
|
||||||
#include "gui/chooser.h"
|
#include "gui/chooser.h"
|
||||||
#include "gui/eval.h"
|
#include "gui/eval.h"
|
||||||
|
#include "gui/message.h"
|
||||||
#include "gui/newgui.h"
|
#include "gui/newgui.h"
|
||||||
#include "gui/options.h"
|
#include "gui/options.h"
|
||||||
#include "gui/PopUpWidget.h"
|
#include "gui/PopUpWidget.h"
|
||||||
@ -821,9 +822,15 @@ void GlobalOptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint3
|
|||||||
if (browser.runModal() > 0) {
|
if (browser.runModal() > 0) {
|
||||||
// User made his choice...
|
// User made his choice...
|
||||||
FilesystemNode dir(browser.getResult());
|
FilesystemNode dir(browser.getResult());
|
||||||
|
if(dir.isWritable())
|
||||||
|
{
|
||||||
_savePath->setLabel(dir.getPath());
|
_savePath->setLabel(dir.getPath());
|
||||||
|
} else {
|
||||||
|
MessageDialog error("The chosen directory cannot be written to. Please select another one.");
|
||||||
|
error.runModal();
|
||||||
|
return;
|
||||||
|
}
|
||||||
draw();
|
draw();
|
||||||
// TODO - we should check if the directory is writeable before accepting it
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user