Skip to content

Commit 58295bb

Browse files
committed
Merge pull request #1339 from charliewilliams/master
Fix loading files from full paths
2 parents d986238 + dee3d86 commit 58295bb

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

cocos2d/Support/CCFileUtils.m

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,7 @@ - (void)loadFileNameLookupsInAllSearchPathsWithName:(NSString *)filename
549549

550550
-(NSString*) fullPathForFilename:(NSString*)filename
551551
{
552-
return [self fullPathForFilename:filename contentScale:NULL];
552+
return [self fullPathForFilenameIgnoringResolutions:filename];
553553
}
554554

555555
-(NSString*) fullPathForFilename:(NSString*)filename contentScale:(CGFloat *)contentScale
@@ -558,12 +558,10 @@ -(NSString*) fullPathForFilename:(NSString*)filename contentScale:(CGFloat *)con
558558
if(!contentScale) contentScale = &_contentScale;
559559

560560
// fullpath? return it
561-
// if ([filename isAbsolutePath]) {
562-
// CCLOGWARN(@"cocos2d: WARNING fullPathForFilename:resolutionType: should not be called with absolute path. Instead call fullPathForFilenameIgnoringResolutions:");
563-
// *contentScale = 1.0;
564-
// NSLog(@"filename:%@, fullPath:%@, contentScale:%f", filename, filename, *contentScale);
565-
// return filename;
566-
// }
561+
if ([filename isAbsolutePath]) {
562+
CCLOGWARN(@"cocos2d: WARNING fullPathForFilename:resolutionType: should not be called with absolute path. Instead call fullPathForFilenameIgnoringResolutions:");
563+
return filename;
564+
}
567565

568566
// Already Cached ?
569567
CCCacheValue *value = [_fullPathCache objectForKey:filename];

0 commit comments

Comments
 (0)