Revision: 28959
          http://sourceforge.net/p/bibdesk/svn/28959
Author:   hofman
Date:     2024-10-16 09:34:44 +0000 (Wed, 16 Oct 2024)
Log Message:
-----------
declare variable in for loop to avoid being strong

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

Modified: trunk/bibdesk/BibDocument.m
===================================================================
--- trunk/bibdesk/BibDocument.m 2024-10-16 09:16:05 UTC (rev 28958)
+++ trunk/bibdesk/BibDocument.m 2024-10-16 09:34:44 UTC (rev 28959)
@@ -1231,7 +1231,6 @@
     NSString *bibtexFile = [[[saveTargetURL lastPathComponent] 
stringByDeletingPathExtension] stringByAppendingPathExtension:@"bib"];
     NSFileManager *fm = [NSFileManager defaultManager];
     NSWorkspace *ws = [NSWorkspace sharedWorkspace];
-    NSString *filePath;
     NSMutableSet *parents = [NSMutableSet set];
     NSString *commonParent = nil;
     NSMutableSet *localFiles = [NSMutableSet set];
@@ -1239,13 +1238,15 @@
     
     for (BibItem *item in [self publicationsForSaving]) {
         for (BDSKLinkedFile *file in [item localFiles]) {
-            if ((filePath = [file path]) && [fm fileExistsAtPath:filePath] && 
[ws isFolderAtPath:filePath] == NO) {
+            NSString *filePath = [file path];
+            if (filePath && [fm fileExistsAtPath:filePath] && [ws 
isFolderAtPath:filePath] == NO) {
                 [localFiles addObject:filePath];
                 [parents addObject:[filePath 
stringByDeletingLastPathComponent]];
             }
         }
         for (NSString *field in localFileFields) {
-            if ((filePath = [[item localFileURLForField:field] path]) && [fm 
fileExistsAtPath:filePath] && [ws isFolderAtPath:filePath] == NO) {
+            NSString *filePath = [[item localFileURLForField:field] path];
+            if (filePath && [fm fileExistsAtPath:filePath] && [ws 
isFolderAtPath:filePath] == NO) {
                 [localFiles addObject:filePath];
                 [parents addObject:[filePath 
stringByDeletingLastPathComponent]];
             }
@@ -1252,7 +1253,7 @@
         }
     }
     
-    for (filePath in parents)
+    for (NSString *filePath in parents)
         commonParent = commonParent ? [filePath 
commonRootPathOfFile:commonParent] : filePath;
     
     NSData *bibtexData = [self bibTeXDataDroppingInternal:NO 
relativeToPath:commonParent error:outError];
@@ -1264,7 +1265,7 @@
         if ([localFiles count]) {
             [args addObject:@"-C"];
             [args addObject:commonParent];
-            for (filePath in localFiles)
+            for (NSString *filePath in localFiles)
                 [args addObject:[filePath relativePathFromPath:commonParent]];
         }
         NSTask *task = [[BDSKTask alloc] init];

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
Bibdesk-commit mailing list
Bibdesk-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit

Reply via email to