diff --git a/src/Main/SharpDevelop/Workbench/FileService.cs b/src/Main/SharpDevelop/Workbench/FileService.cs index 36816e36a4..8e182eac25 100644 --- a/src/Main/SharpDevelop/Workbench/FileService.cs +++ b/src/Main/SharpDevelop/Workbench/FileService.cs @@ -570,7 +570,9 @@ namespace ICSharpCode.SharpDevelop.Workbench /// public bool RenameFile(string oldName, string newName, bool isDirectory) { - if (FileUtility.IsEqualFileName(oldName, newName)) + if (string.Equals(FileUtility.NormalizePath(oldName), + FileUtility.NormalizePath(newName), + StringComparison.Ordinal)) return false; FileChangeWatcher.DisableAllChangeWatchers(); try { @@ -580,12 +582,10 @@ namespace ICSharpCode.SharpDevelop.Workbench return false; if (!eargs.OperationAlreadyDone) { try { - if (FileHelpers.CheckRenameOrReplacePossible(eargs)) { - if (isDirectory) { - Directory.Move(oldName, newName); - } else { - File.Move(oldName, newName); - } + if (isDirectory) { + Directory.Move(oldName, newName); + } else { + File.Move(oldName, newName); } } catch (Exception e) { if (isDirectory) {