Permalink
Browse files

Merge pull request #168 from fightangel/rename-folder

Update link files when renaming a folder
  • Loading branch information...
2 parents 23ddc59 + 541cc14 commit c11d4a053e787a2bba90ae4b4146b3b4176c05b2 @alanmcgovern alanmcgovern committed Mar 12, 2012
Showing with 7 additions and 0 deletions.
  1. +7 −0 main/src/core/MonoDevelop.Core/MonoDevelop.Projects/SolutionFolder.cs
@@ -722,6 +722,13 @@ void RenameDirectoryInAllProjects (FilePath oldName, FilePath newName)
fInfo.Name = newName;
else if (fInfo.FilePath.IsChildPathOf (oldName))
fInfo.Name = newName.Combine (fInfo.FilePath.ToRelative (oldName));
+ else if (fInfo.IsLink) {
+ // update links
+ var fullVirtualPath = projectEntry.BaseDirectory.Combine(fInfo.ProjectVirtualPath);
+ if (fullVirtualPath.IsChildPathOf (oldName))
+ fInfo.Link = newName.ToRelative (projectEntry.BaseDirectory)
+ .Combine (fullVirtualPath.ToRelative (oldName));
+ }
}
}
}

0 comments on commit c11d4a0

Please sign in to comment.