Skip to content
Permalink
Browse files

BACKENDS: Create the default save directory if it doesn't exist

  • Loading branch information...
ccawley2011 authored and bluegr committed Jul 1, 2019
1 parent 43b4528 commit 04c57babbc06dfba33a5597a83e80c27c1ba6be9
Showing with 3 additions and 1 deletion.
  1. +3 −1 backends/saves/default/default-saves.cpp
@@ -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");
}

0 comments on commit 04c57ba

Please sign in to comment.
You can’t perform that action at this time.