diff options
Diffstat (limited to 'macosx/HBUtilities.m')
-rw-r--r-- | macosx/HBUtilities.m | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/macosx/HBUtilities.m b/macosx/HBUtilities.m index a0db9927b..8d83f46f3 100644 --- a/macosx/HBUtilities.m +++ b/macosx/HBUtilities.m @@ -71,13 +71,13 @@ return isStale ? nil : url; } -+ (nullable NSData *)bookmarkFromURL:(NSURL *)url ++ (nullable NSData *)bookmarkFromURL:(NSURL *)url options:(NSURLBookmarkCreationOptions)options { NSParameterAssert(url); NSError *error; - NSData *bookmark = [url bookmarkDataWithOptions:NSURLBookmarkCreationWithSecurityScope includingResourceValuesForKeys:nil relativeToURL:nil error:&error]; + NSData *bookmark = [url bookmarkDataWithOptions:options includingResourceValuesForKeys:nil relativeToURL:nil error:&error]; if (error) { @@ -88,6 +88,11 @@ return bookmark; } ++ (nullable NSData *)bookmarkFromURL:(NSURL *)url +{ + return [HBUtilities bookmarkFromURL:url options:NSURLBookmarkCreationWithSecurityScope]; +} + + (NSString *)displayNameForURL:(NSURL *)URL { NSString *displayName = URL.lastPathComponent; |