summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2013-06-22 21:39:09 +0000
committerSND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2013-06-22 21:39:09 +0000
commit3381afb0699b775333ac2243c64960daf0227db2 (patch)
tree888356ba3e9250fab97f7707c8db288884a333ba
parentdfa1cc3800783138dd2905eea3256dbeea237ad8 (diff)
downloadpcsxr-3381afb0699b775333ac2243c64960daf0227db2.tar.gz
Handle getting passed "files" that are actually command line options. This has the side effect of rejecting nonexistant files as well.
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@85491 e17a0e51-4ae3-4d35-97c3-1a29b211df97
-rwxr-xr-xmacosx/PcsxrController.m5
1 files changed, 5 insertions, 0 deletions
diff --git a/macosx/PcsxrController.m b/macosx/PcsxrController.m
index 4bb4a565..9c122a4c 100755
--- a/macosx/PcsxrController.m
+++ b/macosx/PcsxrController.m
@@ -767,6 +767,11 @@ otherblock();\
}
}
+ if (![[NSFileManager defaultManager] fileExistsAtPath:filename]) {
+ NSLog(@"Nonexistant file %@ was passed to open.", filename);
+ return NO;
+ }
+
NSError *err = nil;
NSString *utiFile = [[NSWorkspace sharedWorkspace] typeOfFile:filename error:&err];
if (err) {