From 729a827372da9d9c7b8381cbfde08a5149d44196 Mon Sep 17 00:00:00 2001 From: Matthew Parlane Date: Mon, 12 Jan 2015 10:47:35 +1300 Subject: [PATCH] Don't open a file handle for a directory in FileIO --- Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_FileIO.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_FileIO.cpp b/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_FileIO.cpp index f9d3486c27..ec3a23ebc3 100644 --- a/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_FileIO.cpp +++ b/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_FileIO.cpp @@ -107,7 +107,7 @@ IPCCommandResult CWII_IPC_HLE_Device_FileIO::Open(u32 _CommandAddress, u32 _Mode // The file must exist before we can open it // It should be created by ISFS_CreateFile, not here - if (File::Exists(m_filepath)) + if (File::Exists(m_filepath) && !File::IsDirectory(m_filepath)) { INFO_LOG(WII_IPC_FILEIO, "FileIO: Open %s (%s == %08X)", m_Name.c_str(), Modes[_Mode], _Mode); ReturnValue = m_DeviceID;