aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPAppController.m
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2013-01-25 20:14:11 +0000
committerstuconnolly <stuart02@gmail.com>2013-01-25 20:14:11 +0000
commitb442a9920d8e873c4df7b84799aa49e551922e2d (patch)
tree1b52e6e477419456b11327a6b920b59ca5d80fcd /Source/SPAppController.m
parentdfd3414cbcfc025caa23285c7d1a8f108b09b5f1 (diff)
downloadsequelpro-b442a9920d8e873c4df7b84799aa49e551922e2d.tar.gz
sequelpro-b442a9920d8e873c4df7b84799aa49e551922e2d.tar.bz2
sequelpro-b442a9920d8e873c4df7b84799aa49e551922e2d.zip
Fix more warnings.
Diffstat (limited to 'Source/SPAppController.m')
-rw-r--r--Source/SPAppController.m8
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/SPAppController.m b/Source/SPAppController.m
index 9737630e..1575e235 100644
--- a/Source/SPAppController.m
+++ b/Source/SPAppController.m
@@ -279,15 +279,15 @@ YY_BUFFER_STATE yy_scan_string (const char *);
*/
- (void)application:(NSApplication *)app openFiles:(NSArray *)filenames
{
-
for (NSString *filename in filenames)
{
// Opens a sql file and insert its content into the Custom Query editor
- if([[[filename pathExtension] lowercaseString] isEqualToString:[SPFileExtensionSQL lowercaseString]]) {
+ if ([[[filename pathExtension] lowercaseString] isEqualToString:[SPFileExtensionSQL lowercaseString]]) {
// Check size and NSFileType
- NSDictionary *attr = [[NSFileManager defaultManager] fileAttributesAtPath:filename traverseLink:YES];
- if(attr)
+ NSDictionary *attr = [[NSFileManager defaultManager] attributesOfItemAtPath:filename error:nil];
+
+ if (attr)
{
NSNumber *filesize = [attr objectForKey:NSFileSize];
NSString *filetype = [attr objectForKey:NSFileType];