mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-07 14:45:41 +12:00
ExtSaveData: Fix error codes & always create user/boss directories
This commit is contained in:
parent
667717ef91
commit
8729e0dfd8
1 changed files with 5 additions and 4 deletions
|
@ -210,11 +210,12 @@ void ExtSaveDataArchive::format(const FSPath& path, const FormatInfo& info) {
|
|||
if (!isShared) {
|
||||
// Delete all contents by deleting the directory then recreating it
|
||||
fs::remove_all(saveDataPath);
|
||||
fs::create_directories(saveDataPath);
|
||||
fs::create_directories(saveDataPath / "user");
|
||||
fs::create_directories(saveDataPath / "boss");
|
||||
}
|
||||
|
||||
fs::create_directories(saveDataPath);
|
||||
fs::create_directories(saveDataPath / "user");
|
||||
fs::create_directories(saveDataPath / "boss");
|
||||
|
||||
// Write format info on disk
|
||||
IOFile file(formatInfoPath, "wb");
|
||||
file.writeBytes(&info, sizeof(info));
|
||||
|
@ -248,7 +249,7 @@ Rust::Result<ArchiveBase::FormatInfo, HorizonResult> ExtSaveDataArchive::getForm
|
|||
|
||||
// If the file failed to open somehow, we return that the archive is not formatted
|
||||
if (!file.isOpen()) {
|
||||
return Err(Result::FS::NotFormatted);
|
||||
return isShared ? Err(Result::FS::NotFormatted) : Err(Result::FS::NotFoundInvalid);
|
||||
}
|
||||
|
||||
FormatInfo ret = {};
|
||||
|
|
Loading…
Add table
Reference in a new issue