Revision: 28896
http://sourceforge.net/p/bibdesk/svn/28896
Author: hofman
Date: 2024-05-08 14:33:24 +0000 (Wed, 08 May 2024)
Log Message:
-----------
reuse variable
Modified Paths:
--------------
trunk/bibdesk/BDSKAppController.m
Modified: trunk/bibdesk/BDSKAppController.m
===================================================================
--- trunk/bibdesk/BDSKAppController.m 2024-05-07 23:08:35 UTC (rev 28895)
+++ trunk/bibdesk/BDSKAppController.m 2024-05-08 14:33:24 UTC (rev 28896)
@@ -273,10 +273,11 @@
- (void)applicationWillFinishLaunching:(NSNotification *)aNotification{
NSUserDefaults *sud = [NSUserDefaults standardUserDefaults];
+ NSFileManager *fm = [NSFileManager defaultManager];
// make sure the temporary base directory is created
// balanced for cleanup in applicationWillTerminate
- [[NSFileManager defaultManager]
uniqueTemporaryDirectoryURLWithBasename:nil];
+ [fm uniqueTemporaryDirectoryURLWithBasename:nil];
// this makes sure that the defaults are registered
[BDSKPreferenceController sharedPreferenceController];
@@ -315,15 +316,14 @@
[[NSAppleEventManager sharedAppleEventManager] setEventHandler:self
andSelector:@selector(handleGetURLEvent:withReplyEvent:)
forEventClass:kInternetEventClass andEventID:kAEGetURL];
// copy files to application support, do this before any document may be
opened
- NSFileManager *fileManager = [NSFileManager defaultManager];
- [fileManager copyFileFromSharedSupportToApplicationSupport:@"Templates"
overwrite:NO];
- [fileManager
copyFileFromSharedSupportToApplicationSupport:@"previewtemplate.tex"
overwrite:NO];
- [fileManager copyFileFromSharedSupportToApplicationSupport:@"template.txt"
overwrite:NO];
- [fileManager
copyFileFromSharedSupportToApplicationSupport:@"Bookmarks.plist" overwrite:NO];
+ [fm copyFileFromSharedSupportToApplicationSupport:@"Templates"
overwrite:NO];
+ [fm copyFileFromSharedSupportToApplicationSupport:@"previewtemplate.tex"
overwrite:NO];
+ [fm copyFileFromSharedSupportToApplicationSupport:@"template.txt"
overwrite:NO];
+ [fm copyFileFromSharedSupportToApplicationSupport:@"Bookmarks.plist"
overwrite:NO];
- NSURL *scriptsURL = [[fileManager applicationSupportDirectoryURL]
URLByAppendingPathComponent:@"Scripts" isDirectory:YES];
+ NSURL *scriptsURL = [[fm applicationSupportDirectoryURL]
URLByAppendingPathComponent:@"Scripts" isDirectory:YES];
if ([scriptsURL checkResourceIsReachableAndReturnError:NULL] == NO)
- [fileManager createDirectoryAtURL:scriptsURL
withIntermediateDirectories:NO attributes:nil error:NULL];
+ [fm createDirectoryAtURL:scriptsURL withIntermediateDirectories:NO
attributes:nil error:NULL];
}
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification{
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit