Permalink
Browse files

[Ide] Correctly create a ProjectFile when an existing directory is added

The code had a mismatched if/else which meant that if there was no existing
projectfile mapping to the directory which was just added, a new one was not
added. This resolves bug #3173.
  • Loading branch information...
alanmcgovern committed Feb 1, 2012
1 parent d4336e3 commit 3610ff42d544946b689a4315562c4cde99341408
@@ -415,10 +415,10 @@ public void AddExistingFolder ()
MessageService.ShowWarning (GettextCatalog.GetString (
"There is already a link with the name '{0}' in the target directory", srcRoot.FileName));
return;
- } else {
- project.Files.Add (new ProjectFile (targetRoot) { Subtype = Subtype.Directory });
- changedProject = true;
}
+ } else {
+ project.Files.Add (new ProjectFile (targetRoot) { Subtype = Subtype.Directory });
+ changedProject = true;
}
var foundFiles = Directory.GetFiles (srcRoot, "*", SearchOption.AllDirectories);

0 comments on commit 3610ff4

Please sign in to comment.