diff api/Factories/Xml/WarFoundryXmlFactory.cs @ 151:1d13820b3d96

Fixes #176: Bug when saving recently edited army * Add loaded file cleanup to AbstractWarFoundryFactory * Add override of method with Zip reference closing to WarFoundryXmlFactory WarFoundry now no longer ends up with trailing handles to files, although why they only caused problems in some situations is unknown Also: * Some line ending fixes (curse cross-platform development and different line terminators!)
author IBBoard <dev@ibboard.co.uk>
date Sat, 26 Sep 2009 18:48:36 +0000
parents a37cdcbcad14
children 70ba3bee0c2e
line wrap: on
line diff
--- a/api/Factories/Xml/WarFoundryXmlFactory.cs	Sat Sep 26 10:43:28 2009 +0000
+++ b/api/Factories/Xml/WarFoundryXmlFactory.cs	Sat Sep 26 18:48:36 2009 +0000
@@ -108,7 +108,12 @@
 		{
 			XmlElement elem = GetRootElementFromStream(dataStream, WarFoundryXmlElementName.RACE_ELEMENT);
 			LogNotifier.Debug(GetType(), "Create Race");
-			return raceFactory.CreateRaceFromElement(file, elem);
+			return raceFactory.CreateRaceFromElement(file, elem);
+		}
+
+		protected override void CleanUpFileAsSupportedType(ZipFile typedFile)
+		{
+			typedFile.Close();
 		}
 
 		public override void CompleteLoading(IWarFoundryStagedLoadObject obj)