Revision: 28321
          http://sourceforge.net/p/bibdesk/svn/28321
Author:   hofman
Date:     2023-07-17 08:49:09 +0000 (Mon, 17 Jul 2023)
Log Message:
-----------
only redirect relative local file fields forExport, as the data will not change 
for Save As

Modified Paths:
--------------
    trunk/bibdesk/BibDocument.h
    trunk/bibdesk/BibDocument.m

Modified: trunk/bibdesk/BibDocument.h
===================================================================
--- trunk/bibdesk/BibDocument.h 2023-07-16 21:43:18 UTC (rev 28320)
+++ trunk/bibdesk/BibDocument.h 2023-07-17 08:49:09 UTC (rev 28321)
@@ -284,7 +284,6 @@
     NSDictionary *mainWindowSetupDictionary;
     
     NSURL *saveTargetURL;
-    NSSaveOperationType currentSaveOperation;
     
     NSInvocation *shouldCloseInvocation;
     

Modified: trunk/bibdesk/BibDocument.m
===================================================================
--- trunk/bibdesk/BibDocument.m 2023-07-16 21:43:18 UTC (rev 28320)
+++ trunk/bibdesk/BibDocument.m 2023-07-17 08:49:09 UTC (rev 28321)
@@ -237,9 +237,6 @@
         // need to set this for new documents
         docState.documentStringEncoding = [BDSKStringEncodingManager 
defaultEncoding];
         
-        saveTargetURL = nil;
-        currentSaveOperation = NSNotFound;
-        
         // these are created lazily when needed
         pboardHelper = nil;
         fileSearchController = nil;
@@ -1216,12 +1213,10 @@
 - (BOOL)writeSafelyToURL:(NSURL *)absoluteURL ofType:(NSString *)typeName 
forSaveOperation:(NSSaveOperationType)saveOperation error:(NSError **)outError;
 {
     saveTargetURL = [absoluteURL copy];
-    currentSaveOperation = saveOperation;
     
     BOOL didSave = [super writeSafelyToURL:absoluteURL ofType:typeName 
forSaveOperation:saveOperation error:outError];
     
     BDSKDESTROY(saveTargetURL);
-    currentSaveOperation = NSNotFound;
     
     if (didSave) {
         NSFileManager *fm = [NSFileManager defaultManager];
@@ -1435,7 +1430,7 @@
         options |= BDSKBibTeXOptionTeXify;
     if (drop)
         options |= BDSKBibTeXOptionDropInternal;
-    if ((currentSaveOperation == NSSaveAsOperation || currentSaveOperation == 
NSSaveToOperation) && aBasePath && [self fileURL] && [aBasePath 
isEqualToString:[self basePath]] == NO)
+    if (docFlags.isExporting && aBasePath && [self fileURL] && [aBasePath 
isEqualToString:[self basePath]] == NO)
         options |= BDSKBibTeXOptionRedirectRelativeFiles;
     
     if([[NSUserDefaults standardUserDefaults] 
boolForKey:BDSKShouldUseTemplateFileKey]){

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

Reply via email to