mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-06-06 11:01:38 +12:00
Add SystemSaveData::CreateFile
This commit is contained in:
parent
7c2167e0f2
commit
1332488326
3 changed files with 39 additions and 6 deletions
src/core/fs
|
@ -12,8 +12,9 @@ HorizonResult SaveDataArchive::createFile(const FSPath& path, u64 size) {
|
|||
fs::path p = IOFile::getAppData() / "SaveData";
|
||||
p += fs::path(path.utf16_string).make_preferred();
|
||||
|
||||
if (fs::exists(p))
|
||||
if (fs::exists(p)) {
|
||||
return Result::FS::AlreadyExists;
|
||||
}
|
||||
|
||||
IOFile file(p.string().c_str(), "wb");
|
||||
|
||||
|
@ -33,7 +34,7 @@ HorizonResult SaveDataArchive::createFile(const FSPath& path, u64 size) {
|
|||
return Result::FS::FileTooLarge;
|
||||
}
|
||||
|
||||
Helpers::panic("SaveDataArchive::OpenFile: Failed");
|
||||
Helpers::panic("SaveDataArchive::CreateFile: Failed");
|
||||
return Result::Success;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue