From 6164cb82922d1e6e4df46279455879860ecf74b8 Mon Sep 17 00:00:00 2001 From: Giles Williams Date: Sat, 9 Jul 2005 23:13:23 +0000 Subject: [PATCH] checks OXP requirements using fall-back XML loading of dictionary if necessary git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@96 127b21dd-08f5-0310-b4b7-95ae10353056 --- ResourceManager.m | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/ResourceManager.m b/ResourceManager.m index ecbc9ef9..75d4a143 100644 --- a/ResourceManager.m +++ b/ResourceManager.m @@ -177,7 +177,15 @@ NSMutableDictionary* surface_cache; BOOL require_test = YES; // check for compatibility if ([[NSFileManager defaultManager] fileExistsAtPath:requiresPath]) - require_test = [ResourceManager areRequirementsFulfilled:[NSDictionary dictionaryWithContentsOfFile:requiresPath]]; + { + NSDictionary* requires_dic = [NSDictionary dictionaryWithContentsOfFile:requiresPath]; + + // FIX FOR WINDOWS GNUSTEP NOT PARSING XML PLISTS + if (!requires_dic) // try parsing it using our home-grown XML parser + requires_dic = (NSDictionary*)[ResourceManager parseXMLPropertyList:[NSString stringWithContentsOfFile:requiresPath]]; + + require_test = [ResourceManager areRequirementsFulfilled:requires_dic]; + } if (require_test) [file_paths addObject:possibleExpansionPath]; // it made it in! else