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.
This commit is contained in:
Jordan Woyak 2013-02-17 12:51:12 -06:00
parent bf4be1d8d1
commit 0cdd4434b9
2 changed files with 2 additions and 2 deletions

View File

@ -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)

View File

@ -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);
}