summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2011-12-12 19:17:36 +0000
committerSND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2011-12-12 19:17:36 +0000
commit567a7466739757d66314483fea5abd89d4d084d4 (patch)
tree55e164a23446bcdcae7f8795ed67d972a7af8758
parent5fd066c404c8bc3bc535e25d9ae3fe415659ef56 (diff)
downloadpcsxr-567a7466739757d66314483fea5abd89d4d084d4.tar.gz
Fixed a memory leak in HandleBinCue.
Fixed a bug in HandleBinCue. Made it so that HandleBinCue checks to see if there is a file with .bin. If not, use .BIN. This should help with case-sensitive filesystems. git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@73194 e17a0e51-4ae3-4d35-97c3-1a29b211df97
-rw-r--r--macosx/PcsxrController.m8
1 files changed, 6 insertions, 2 deletions
diff --git a/macosx/PcsxrController.m b/macosx/PcsxrController.m
index 5a635f2f..e78b8806 100644
--- a/macosx/PcsxrController.m
+++ b/macosx/PcsxrController.m
@@ -23,10 +23,14 @@ static NSString *HandleBinCue(NSString *toHandle)
NSString *newName = toHandle;
if ([extension caseInsensitiveCompare:@"cue"] == NSOrderedSame) {
NSURL *temp1 = [tempURL URLByDeletingPathExtension];
- //TODO: handle case-sensitive filesystems
- NSURL *temp2 = [tempURL URLByAppendingPathExtension:@"bin"];
+ //TODO: handle case-sensitive filesystems better
+ NSURL *temp2 = [temp1 URLByAppendingPathExtension:@"bin"];
+ if (![[NSFileManager defaultManager] fileExistsAtPath:[temp2 path]]) {
+ temp2 = [temp1 URLByAppendingPathExtension:@"BIN"];
+ }
newName = [temp2 path];
}
+ [tempURL release];
return newName;
}