Revision: 4048
http://skim-app.svn.sourceforge.net/skim-app/?rev=4048&view=rev
Author: hofman
Date: 2008-06-21 02:28:19 -0700 (Sat, 21 Jun 2008)
Log Message:
-----------
simplify code to find app support file
Modified Paths:
--------------
trunk/SKApplicationController.m
Modified: trunk/SKApplicationController.m
===================================================================
--- trunk/SKApplicationController.m 2008-06-20 21:30:19 UTC (rev 4047)
+++ trunk/SKApplicationController.m 2008-06-21 09:28:19 UTC (rev 4048)
@@ -467,7 +467,7 @@
NSFileManager *fm = [NSFileManager defaultManager];
NSString *filename = [file stringByAppendingPathExtension:extension];
NSString *fullPath = nil;
- NSEnumerator *pathEnum = [[self applicationSupportDirectories]
objectEnumerator];
+ NSEnumerator *pathEnum = [[[self applicationSupportDirectories]
arrayByAddingObject:[[NSBundle mainBundle] sharedSupportPath]]
objectEnumerator];
NSString *appSupportPath = nil;
while (appSupportPath = [pathEnum nextObject]) {
@@ -475,15 +475,8 @@
fullPath = [fullPath stringByAppendingPathComponent:filename];
if ([fm fileExistsAtPath:fullPath] == NO)
fullPath = nil;
+ else break;
}
- if (fullPath == nil) {
- fullPath = [[NSBundle mainBundle] sharedSupportPath];
- if (subpath)
- fullPath = [fullPath stringByAppendingPathComponent:subpath];
- fullPath = [fullPath stringByAppendingPathComponent:filename];
- if ([fm fileExistsAtPath:fullPath] == NO)
- fullPath = nil;
- }
return fullPath;
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit