Skip to content

Commit dee3d86

Browse files
Reintroduce warning for incorrectly calling fullPathForFilename instead of just ignoring it
1 parent a1bd85e commit dee3d86

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

cocos2d/Support/CCFileUtils.m

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -480,12 +480,10 @@ -(NSString*) fullPathForFilename:(NSString*)filename contentScale:(CGFloat *)con
480480
if(!contentScale) contentScale = &_contentScale;
481481

482482
// fullpath? return it
483-
// if ([filename isAbsolutePath]) {
484-
// CCLOGWARN(@"cocos2d: WARNING fullPathForFilename:resolutionType: should not be called with absolute path. Instead call fullPathForFilenameIgnoringResolutions:");
485-
// *contentScale = 1.0;
486-
// NSLog(@"filename:%@, fullPath:%@, contentScale:%f", filename, filename, *contentScale);
487-
// return filename;
488-
// }
483+
if ([filename isAbsolutePath]) {
484+
CCLOGWARN(@"cocos2d: WARNING fullPathForFilename:resolutionType: should not be called with absolute path. Instead call fullPathForFilenameIgnoringResolutions:");
485+
return filename;
486+
}
489487

490488
// Already Cached ?
491489
CCCacheValue *value = [_fullPathCache objectForKey:filename];

0 commit comments

Comments
 (0)