From 0cdd4434b9ce7f6b34d32f79c5fe23eb61602b52 Mon Sep 17 00:00:00 2001 From: Jordan Woyak Date: Sun, 17 Feb 2013 12:51:12 -0600 Subject: [PATCH] Removing destination on rename when source isn't present doesn't make sense. IOCTL_RENAME_FILE still might not be totally correct. Fixes issue 5440. --- Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.cpp | 2 +- Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_fs.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.cpp b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.cpp index 1fe6986179..2d5c86f800 100644 --- a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.cpp +++ b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.cpp @@ -353,7 +353,7 @@ void ExecuteCommand(u32 _Address) Memory::GetString(DeviceName, Memory::Read_U32(_Address + 0xC)); - WARN_LOG(WII_IPC_HLE, "Tried to open %s as %d", DeviceName.c_str(), DeviceID); + WARN_LOG(WII_IPC_HLE, "Trying to open %s as %d", DeviceName.c_str(), DeviceID); if (DeviceID >= 0) { if (DeviceName.find("/dev/es") == 0) diff --git a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_fs.cpp b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_fs.cpp index ecc4be0cb0..38100e5d7a 100644 --- a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_fs.cpp +++ b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_fs.cpp @@ -428,7 +428,7 @@ s32 CWII_IPC_HLE_Device_fs::ExecuteCommand(u32 _Parameter, u32 _BufferIn, u32 _B File::CreateFullPath(FilenameRename); // if there is already a file, delete it - if (File::Exists(FilenameRename)) + if (File::Exists(Filename) && File::Exists(FilenameRename)) { File::Delete(FilenameRename); }