Reorder error handling in extdata FS::CreateFile (#7346)
* Reorder error handling in extdata CreateFile * Apply suggestions
This commit is contained in:
@ -232,8 +232,13 @@ Result SaveDataArchive::CreateFile(const FileSys::Path& path, u64 size) const {
|
||||
}
|
||||
|
||||
if (size == 0) {
|
||||
FileUtil::CreateEmptyFile(full_path);
|
||||
return ResultSuccess;
|
||||
if (allow_zero_size_create) {
|
||||
FileUtil::CreateEmptyFile(full_path);
|
||||
return ResultSuccess;
|
||||
} else {
|
||||
LOG_DEBUG(Service_FS, "Zero-size file is not supported");
|
||||
return ResultUnsupportedOpenFlags;
|
||||
}
|
||||
}
|
||||
|
||||
FileUtil::IOFile file(full_path, "wb");
|
||||
|
Reference in New Issue
Block a user