From 0afd7dea2846ebacec23f4276aa30f84ae3d2908 Mon Sep 17 00:00:00 2001 From: Kingcom Date: Tue, 23 Jul 2013 17:53:55 +0200 Subject: [PATCH] Add error message when opening entire ISO --- Core/FileSystems/DirectoryFileSystem.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Core/FileSystems/DirectoryFileSystem.cpp b/Core/FileSystems/DirectoryFileSystem.cpp index 9a4ffca5ee..89c2cf64e0 100644 --- a/Core/FileSystems/DirectoryFileSystem.cpp +++ b/Core/FileSystems/DirectoryFileSystem.cpp @@ -300,6 +300,12 @@ bool DirectoryFileSystem::RemoveFile(const std::string &filename) { u32 DirectoryFileSystem::OpenFile(std::string filename, FileAccess access, const char *devicename) { + if (filename == "") + { + ERROR_LOG(FILESYS, "DiscDirectoryFileSystem: Opening entire ISO not supported"); + return 0; + } + if (filename.compare(0,8,"/sce_lbn") == 0) { u32 sectorStart = 0xFFFFFFFF, readSize = 0xFFFFFFFF; @@ -329,7 +335,7 @@ u32 DirectoryFileSystem::OpenFile(std::string filename, FileAccess access, const // no file info has been gathered? shouldn't happen if (actualFileName == "") { - ERROR_LOG(FILESYS, "sce_lbn used without calling fileinfo."); + ERROR_LOG(FILESYS, "DiscDirectoryFileSystem: sce_lbn used without calling fileinfo."); return 0; }