BACKENDS: Create the default save directory if it doesn't exist
This commit is contained in:
parent
43b4528552
commit
04c57babbc
1 changed files with 3 additions and 1 deletions
|
@ -63,7 +63,9 @@ DefaultSaveFileManager::DefaultSaveFileManager(const Common::String &defaultSave
|
|||
void DefaultSaveFileManager::checkPath(const Common::FSNode &dir) {
|
||||
clearError();
|
||||
if (!dir.exists()) {
|
||||
setError(Common::kPathDoesNotExist, "The savepath '"+dir.getPath()+"' does not exist");
|
||||
if (!dir.createDirectory()) {
|
||||
setError(Common::kPathDoesNotExist, "Failed to create directory '"+dir.getPath()+"'");
|
||||
}
|
||||
} else if (!dir.isDirectory()) {
|
||||
setError(Common::kPathNotDirectory, "The savepath '"+dir.getPath()+"' is not a directory");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue