diff API/Factories/Xml/WarFoundryXmlFactory.cs @ 443:86725e88052e

Re #380: WarFoundry chokes on zips written by Mac OS X * Add "is dot-file" check to behave like Linux and Mac and ignore files with name ".something" Also: * Fix load failure message argument order * Save some regex checks by making sure zip entry is a file first
author IBBoard <dev@ibboard.co.uk>
date Sun, 04 Dec 2011 20:40:31 +0000
parents 71fceea2725b
children cbeee87dc2d3
line wrap: on
line diff
--- a/API/Factories/Xml/WarFoundryXmlFactory.cs	Sat Dec 03 20:10:13 2011 +0000
+++ b/API/Factories/Xml/WarFoundryXmlFactory.cs	Sun Dec 04 20:40:31 2011 +0000
@@ -40,7 +40,7 @@
 			return factory;
 		}
 		
-		private WarFoundryXmlFactory() : base()
+		protected WarFoundryXmlFactory() : base()
 		{
 			gameSystemFactory = new WarFoundryXmlGameSystemFactory(this);
 			raceFactory = new WarFoundryXmlRaceFactory(this);
@@ -89,7 +89,7 @@
 				
 			foreach (ZipEntry entry in file)
 			{
-				if (re.IsMatch(entry.Name))
+				if (entry.IsFile && re.IsMatch(entry.Name))
 				{
 					entries.Add(entry);
 				}