diff options
Diffstat (limited to 'src/core/file_sys')
| -rw-r--r-- | src/core/file_sys/disk_archive.cpp | 5 |
1 files changed, 4 insertions, 1 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 { | |||
| 40 | ResultCode DiskArchive::CreateFile(const FileSys::Path& path, u64 size) const { | 40 | ResultCode 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); |