File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
iVN.xcodeproj/project.xcworkspace/xcuserdata/uppfinnarn.xcuserdatad Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -101,11 +101,13 @@ - (NSData *)contentsOfResource:(NSString *)res inDirectory:(NSString *)dir
101
101
NSString *dirPath = [path stringByAppendingPathComponent: dir];
102
102
103
103
// Attempt to load from a Zip File first
104
- unzFile zipFile = unzOpen ([dirPath UTF8String ]);
104
+ MTLog (@" Zip Path: %@ " , [dirPath stringByAppendingPathExtension: @" zip" ]);
105
+ unzFile zipFile = unzOpen ([[dirPath stringByAppendingPathExtension: @" zip" ] UTF8String ]);
105
106
if (zipFile != NULL )
106
107
{
107
108
MTLog (@" Reading from Zip..." );
108
- if (unzLocateFile (zipFile, [res UTF8String ], 0 ) == UNZ_OK)
109
+ if (unzLocateFile (zipFile, [res UTF8String ], 0 ) == UNZ_OK ||
110
+ unzLocateFile (zipFile, [[dir stringByAppendingPathComponent: res] UTF8String ], 0 ) == UNZ_OK)
109
111
{
110
112
if (unzOpenCurrentFile (zipFile) == UNZ_OK)
111
113
{
@@ -126,7 +128,7 @@ - (NSData *)contentsOfResource:(NSString *)res inDirectory:(NSString *)dir
126
128
} else MTLog (@" ERROR: Couldn't open Current File" );
127
129
128
130
unzClose (zipFile);
129
- } else MTLog (@" ERROR: Couldn't locate file" );
131
+ } else MTLog (@" ERROR: Couldn't locate file ' %@ ' " , res );
130
132
}
131
133
else
132
134
{
You can’t perform that action at this time.
0 commit comments