Revision: 28908
http://sourceforge.net/p/bibdesk/svn/28908
Author: hofman
Date: 2024-05-15 14:20:41 +0000 (Wed, 15 May 2024)
Log Message:
-----------
avoid using file system to construct url
Modified Paths:
--------------
trunk/bibdesk/BDSKTeXTask.m
trunk/bibdesk/BibDocument.m
trunk/bibdesk/BibPref_Files.m
Modified: trunk/bibdesk/BDSKTeXTask.m
===================================================================
--- trunk/bibdesk/BDSKTeXTask.m 2024-05-15 14:17:32 UTC (rev 28907)
+++ trunk/bibdesk/BDSKTeXTask.m 2024-05-15 14:20:41 UTC (rev 28908)
@@ -384,7 +384,7 @@
if ([[NSUserDefaults standardUserDefaults]
boolForKey:BDSKShouldShareFilesKey]) {
// this should likely be the same encoding as our other files;
presumably it's here because the user can have a default @preamble or something
that's relevant?
- NSURL *templateURL = [[[NSFileManager defaultManager]
applicationSupportDirectoryURL] URLByAppendingPathComponent:@"template.txt"];
+ NSURL *templateURL = [[[NSFileManager defaultManager]
applicationSupportDirectoryURL] URLByAppendingPathComponent:@"template.txt"
isDirectory:NO];
bibTemplate = [[NSMutableString alloc]
initWithContentsOfURL:templateURL encoding:encoding error:&error];
[bibTemplate appendString:@"\n"];
Modified: trunk/bibdesk/BibDocument.m
===================================================================
--- trunk/bibdesk/BibDocument.m 2024-05-15 14:17:32 UTC (rev 28907)
+++ trunk/bibdesk/BibDocument.m 2024-05-15 14:20:41 UTC (rev 28908)
@@ -1392,7 +1392,7 @@
NSStringEncoding groupsEncoding = [BDSKBibTeXParser
isUnparseableEncoding:encoding] ? encoding : NSUTF8StringEncoding;
if([[NSUserDefaults standardUserDefaults]
boolForKey:BDSKShouldUseTemplateFileKey]){
- NSURL *templateURL = [[[NSFileManager defaultManager]
applicationSupportDirectoryURL] URLByAppendingPathComponent:@"template.txt"];
+ NSURL *templateURL = [[[NSFileManager defaultManager]
applicationSupportDirectoryURL] URLByAppendingPathComponent:@"template.txt"
isDirectory:NO];
NSMutableString *templateFile = [NSMutableString
stringWithContentsOfURL:templateURL usedEncoding:NULL error:NULL] ?:
[NSMutableString string];
NSString *userName = NSFullUserName();
Modified: trunk/bibdesk/BibPref_Files.m
===================================================================
--- trunk/bibdesk/BibPref_Files.m 2024-05-15 14:17:32 UTC (rev 28907)
+++ trunk/bibdesk/BibPref_Files.m 2024-05-15 14:20:41 UTC (rev 28908)
@@ -85,7 +85,7 @@
}
- (IBAction)editTemplateFile:(id)sender{
- NSURL *templateURL = [[[NSFileManager defaultManager]
applicationSupportDirectoryURL] URLByAppendingPathComponent:@"template.txt"];
+ NSURL *templateURL = [[[NSFileManager defaultManager]
applicationSupportDirectoryURL] URLByAppendingPathComponent:@"template.txt"
isDirectory:NO];
if (NO == [[NSWorkspace sharedWorkspace] openURL:templateURL] &&
NO == [[NSWorkspace sharedWorkspace] openURLs:@[templateURL]
withAppBundleIdentifier:@"com.apple.TextEdit" options:NSWorkspaceLaunchDefault
additionalEventParamDescriptor:nil launchIdentifiers:NULL])
NSBeep();
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