Revision: 16743
          http://sourceforge.net/p/skim-app/code/16743
Author:   hofman
Date:     2026-10-29 17:29:07 +0000 (Thu, 29 Oct 2026)
Log Message:
-----------
update alias when checking for fileURL by resolving

Modified Paths:
--------------
    trunk/SKAlias.m

Modified: trunk/SKAlias.m
===================================================================
--- trunk/SKAlias.m     2026-10-29 17:15:27 UTC (rev 16742)
+++ trunk/SKAlias.m     2026-10-29 17:29:07 UTC (rev 16743)
@@ -181,7 +181,11 @@
 
 - (BOOL)resolvesToFileURL:(NSURL *)fileURL {
     if (aliasHandle) {
-        return [[fileURLFromAliasHandle(aliasHandle, kResolveAliasFileNoUI) 
path] isCaseInsensitiveEqual:[fileURL path]];
+        NSURL *myFileURL = fileURLFromAliasHandle(aliasHandle, 
kResolveAliasFileNoUI);
+        if (myFileURL == nil)
+            return nil;
+        [self updateWithURL:myFileURL];
+        return [[myFileURL path] isCaseInsensitiveEqual:[fileURL path]];
     } else if (data) {
         NSArray *keys = @[NSURLPathKey, NSURLFileIDKey, 
NSURLVolumeUUIDStringKey];
         NSDictionary *rsrcValues = [fileURL resourceValuesForKeys:keys 
error:NULL];
@@ -216,7 +220,11 @@
             }
         }
         NSURLBookmarkResolutionOptions options = 
NSURLBookmarkResolutionWithoutUI | NSURLBookmarkResolutionWithoutMounting;
-        return [[[NSURL URLByResolvingBookmarkData:data options:options 
relativeToURL:nil bookmarkDataIsStale:NULL error:NULL] path] 
isCaseInsensitiveEqual:(path ?: [fileURL path])];
+        BOOL shouldUpdate = NO;
+        NSURL *myFileURL = [NSURL URLByResolvingBookmarkData:data 
options:options relativeToURL:nil bookmarkDataIsStale:&shouldUpdate error:NULL];
+        if (shouldUpdate && myFileURL)
+            [self updateWithURL:myFileURL];
+        return [[myFileURL path] isCaseInsensitiveEqual:(path ?: [fileURL 
path])];
     }
     return NO;
 }

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



_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to