From 08c1b2fa705bc5c535fd02c616bbb807c073d3ce Mon Sep 17 00:00:00 2001 From: "SND\\eagleeyestudios_cp" Date: Sat, 15 Sep 2012 19:02:56 +0000 Subject: [PATCH] Content Compiler: - Fixed folder-delete bug. Folders can now be deleted. --- Tools/ANXContentCompilerGUI/MainWindow.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Tools/ANXContentCompilerGUI/MainWindow.cs b/Tools/ANXContentCompilerGUI/MainWindow.cs index 3da5d6c9..1cd609ea 100644 --- a/Tools/ANXContentCompilerGUI/MainWindow.cs +++ b/Tools/ANXContentCompilerGUI/MainWindow.cs @@ -13,7 +13,7 @@ namespace ANX.ContentCompiler.GUI { [Developer("SilentWarrior/Eagle Eye Studios")] [PercentageComplete(80)] //TODO: Implement Tour, Preview, Renaming of Folders! - [TestState(TestStateAttribute.TestState.InProgress)] + [TestState(TestStateAttribute.TestState.Tested)] public partial class MainWindow : Form { #region Fields @@ -369,12 +369,12 @@ namespace ANX.ContentCompiler.GUI { if (treeView.RecursiveSearch(name).Nodes.Count > 0) { - foreach (var buildItem in _contentProject.BuildItems.Where(buildItem => buildItem.AssetName.Contains(name))) + for (int i = _contentProject.BuildItems.Count - 1; i >= 0; i--) { - RemoveFile(buildItem.AssetName); + if (_contentProject.BuildItems[i].AssetName.Contains(name.Replace("Content" + Path.DirectorySeparatorChar, ""))) + RemoveFile(_contentProject.BuildItems[i].AssetName); } } - treeView.Nodes.Remove(treeView.RecursiveSearch(name)); } #endregion