aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPEditSheetTextView.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/SPEditSheetTextView.m
parentdfd3414cbcfc025caa23285c7d1a8f108b09b5f1 (diff)
downloadsequelpro-b442a9920d8e873c4df7b84799aa49e551922e2d.tar.gz
sequelpro-b442a9920d8e873c4df7b84799aa49e551922e2d.tar.bz2
sequelpro-b442a9920d8e873c4df7b84799aa49e551922e2d.zip
Fix more warnings.
Diffstat (limited to 'Source/SPEditSheetTextView.m')
-rw-r--r--Source/SPEditSheetTextView.m8
1 files changed, 5 insertions, 3 deletions
diff --git a/Source/SPEditSheetTextView.m b/Source/SPEditSheetTextView.m
index 8ddbb665..8548271f 100644
--- a/Source/SPEditSheetTextView.m
+++ b/Source/SPEditSheetTextView.m
@@ -197,12 +197,14 @@
}
// Check size and NSFileType
- NSDictionary *attr = [[NSFileManager defaultManager] fileAttributesAtPath:filepath traverseLink:YES];
- if(attr)
+ NSDictionary *attr = [[NSFileManager defaultManager] attributesOfItemAtPath:filepath error:nil];
+
+ if (attr)
{
NSNumber *filesize = [attr objectForKey:NSFileSize];
NSString *filetype = [attr objectForKey:NSFileType];
- if(filetype == NSFileTypeRegular && filesize)
+
+ if (filetype == NSFileTypeRegular && filesize)
{
// Ask for confirmation if file content is larger than 1MB
if([filesize unsignedLongValue] > 1000000)