mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Show an error when savedata can't be written.
Normally we'll log when the disk is full for files, but if we can't even create the folder, we'll get errors trying to write into a non-existing directory.
This commit is contained in:
parent
f90754457d
commit
dd497e5a02
2 changed files with 7 additions and 3 deletions
|
@ -306,7 +306,7 @@ bool CreateFullPath(const std::string &fullPath)
|
|||
if (position == fullPath.npos)
|
||||
{
|
||||
if (!File::Exists(fullPath))
|
||||
File::CreateDir(fullPath);
|
||||
return File::CreateDir(fullPath);
|
||||
return true;
|
||||
}
|
||||
std::string subPath = fullPath.substr(0, position);
|
||||
|
|
|
@ -369,8 +369,12 @@ bool SavedataParam::Save(SceUtilitySavedataParam* param, const std::string &save
|
|||
|
||||
std::string dirPath = GetSaveFilePath(param, GetSaveDir(param, saveDirName));
|
||||
|
||||
if (!pspFileSystem.GetFileInfo(dirPath).exists)
|
||||
pspFileSystem.MkDir(dirPath);
|
||||
if (!pspFileSystem.GetFileInfo(dirPath).exists) {
|
||||
if (!pspFileSystem.MkDir(dirPath)) {
|
||||
I18NCategory *err = GetI18NCategory("Error");
|
||||
osm.Show(err->T("Unable to write savedata, disk may be full"));
|
||||
}
|
||||
}
|
||||
|
||||
u8* cryptedData = 0;
|
||||
int cryptedSize = 0;
|
||||
|
|
Loading…
Add table
Reference in a new issue