Browse Source

SD2-713. Renaming a folder to the same name as an existing folder was not updating the MSBuild project if the folder being renamed did not contain any files.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/2.0@1213 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Matt Ward 20 years ago
parent
commit
678dac3c2f
  1. 4
      src/Main/Base/Project/Src/Gui/Pads/ProjectBrowser/TreeNodes/DirectoryNode.cs

4
src/Main/Base/Project/Src/Gui/Pads/ProjectBrowser/TreeNodes/DirectoryNode.cs

@ -487,9 +487,7 @@ namespace ICSharpCode.SharpDevelop.Project
if (Directory != null) { if (Directory != null) {
string newPath = Path.Combine(Path.GetDirectoryName(Directory), newName); string newPath = Path.Combine(Path.GetDirectoryName(Directory), newName);
if (System.IO.Directory.Exists(newPath)) { if (System.IO.Directory.Exists(newPath)) {
if (System.IO.Directory.GetFiles(Directory).Length == 0) { if (System.IO.Directory.GetFileSystemEntries(newPath).Length == 0) {
System.IO.Directory.Delete(Directory);
} else if (System.IO.Directory.GetFiles(newPath).Length == 0) {
System.IO.Directory.Delete(newPath); System.IO.Directory.Delete(newPath);
FileService.RenameFile(Directory, newPath, true); FileService.RenameFile(Directory, newPath, true);
} else { } else {

Loading…
Cancel
Save