Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jordan-woyak committed Feb 17, 2013
1 parent bf4be1d commit 0cdd443
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.cpp
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_fs.cpp
Expand Up @@ -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);
}
Expand Down

0 comments on commit 0cdd443

Please sign in to comment.