diff options
| author | SND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2013-06-22 21:39:09 +0000 |
|---|---|---|
| committer | SND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2013-06-22 21:39:09 +0000 |
| commit | 3381afb0699b775333ac2243c64960daf0227db2 (patch) | |
| tree | 888356ba3e9250fab97f7707c8db288884a333ba | |
| parent | dfa1cc3800783138dd2905eea3256dbeea237ad8 (diff) | |
| download | pcsxr-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-x | macosx/PcsxrController.m | 5 |
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) { |
