mirror of
https://github.com/scummvm/scummvm.git
synced 2026-06-20 05:45:29 +00:00
BACKENDS: Create the default save directory if it doesn't exist
This commit is contained in:
committed by
Filippos Karapetis
parent
43b4528552
commit
04c57babbc
@@ -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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user