Skip to content
This repository has been archived by the owner on Oct 16, 2020. It is now read-only.

Fixed bug #674 Unhandled Exception when Moving Folder of Classes from Project A to Project B #718

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ public static void CopyDirectory(string directoryName, DirectoryNode node, bool
if (!FileUtility.IsEqualFileName(directoryName, copiedFileName)) {
if (includeInProject && ProjectService.OpenSolution != null) {
// get ProjectItems in source directory
FileService.CopyFile(directoryName, copiedFileName, true, false);
foreach (IProject project in ProjectService.OpenSolution.Projects) {
if (!FileUtility.IsBaseDirectory(project.Directory, directoryName))
continue;
Expand Down Expand Up @@ -111,7 +112,6 @@ public static void CopyDirectory(string directoryName, DirectoryNode node, bool
}
}

FileService.CopyFile(directoryName, copiedFileName, true, false);
DirectoryNode newNode = new DirectoryNode(copiedFileName);
newNode.InsertSorted(node);
if (includeInProject) {
Expand Down Expand Up @@ -365,6 +365,7 @@ protected IEnumerable<FileProjectItem> AddNewItems()
FileTemplateResult result = SD.UIService.ShowNewFileDialog(node.Project, node.Directory);
if (result != null) {
node.RecreateSubNodes();
ProjectBrowserPad.Instance.ProjectBrowserControl.SelectFile(result.Options.FileName);
return result.NewFiles.Select(node.Project.FindFile).Where(f => f != null).ToArray();
} else {
return null;
Expand Down