summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Subv2015-12-28 09:55:38 -0500
committerGravatar Subv2016-03-20 14:28:10 -0500
commitb350f192bbfe61a212e00ea70d4dcd7d3e90b60a (patch)
treee49a83653a6d8aa4fe8e8818393d86ecf3e525d9 /src
parentHLE/FS: FS::CreateFile takes an u64 for the file size. (diff)
downloadyuzu-b350f192bbfe61a212e00ea70d4dcd7d3e90b60a.tar.gz
yuzu-b350f192bbfe61a212e00ea70d4dcd7d3e90b60a.tar.xz
yuzu-b350f192bbfe61a212e00ea70d4dcd7d3e90b60a.zip
HLE/FS: Corrected the error codes for CreateFile
Diffstat (limited to 'src')
-rw-r--r--src/core/file_sys/disk_archive.cpp5
-rw-r--r--src/core/hle/result.h4
2 files changed, 7 insertions, 2 deletions
diff --git a/src/core/file_sys/disk_archive.cpp b/src/core/file_sys/disk_archive.cpp
index 614c2e2a0..5c68e944f 100644
--- a/src/core/file_sys/disk_archive.cpp
+++ b/src/core/file_sys/disk_archive.cpp
@@ -40,8 +40,11 @@ bool DiskArchive::DeleteDirectory(const Path& path) const {
40ResultCode DiskArchive::CreateFile(const FileSys::Path& path, u64 size) const { 40ResultCode DiskArchive::CreateFile(const FileSys::Path& path, u64 size) const {
41 std::string full_path = mount_point + path.AsString(); 41 std::string full_path = mount_point + path.AsString();
42 42
43 if (FileUtil::IsDirectory(full_path))
44 return ResultCode(ErrorDescription::FS_NotAFile, ErrorModule::FS, ErrorSummary::Canceled, ErrorLevel::Status);
45
43 if (FileUtil::Exists(full_path)) 46 if (FileUtil::Exists(full_path))
44 return ResultCode(ErrorDescription::AlreadyExists, ErrorModule::FS, ErrorSummary::NothingHappened, ErrorLevel::Info); 47 return ResultCode(ErrorDescription::FS_AlreadyExists, ErrorModule::FS, ErrorSummary::NothingHappened, ErrorLevel::Status);
45 48
46 if (size == 0) { 49 if (size == 0) {
47 FileUtil::CreateEmptyFile(full_path); 50 FileUtil::CreateEmptyFile(full_path);
diff --git a/src/core/hle/result.h b/src/core/hle/result.h
index 69613fbbb..b9ee5f7d9 100644
--- a/src/core/hle/result.h
+++ b/src/core/hle/result.h
@@ -19,7 +19,9 @@
19enum class ErrorDescription : u32 { 19enum class ErrorDescription : u32 {
20 Success = 0, 20 Success = 0,
21 WrongAddress = 53, 21 WrongAddress = 53,
22 FS_NotFound = 100, 22 FS_NotFound = 120,
23 FS_AlreadyExists = 190,
24 FS_NotAFile = 250,
23 FS_NotFormatted = 340, ///< This is used by the FS service when creating a SaveData archive 25 FS_NotFormatted = 340, ///< This is used by the FS service when creating a SaveData archive
24 InvalidSection = 1000, 26 InvalidSection = 1000,
25 TooLarge = 1001, 27 TooLarge = 1001,