Commit 3c422c66 authored by GitLab CI's avatar GitLab CI

Merge remote-tracking branch 'upstream/master' into master-build

* upstream/master:
  MacGui: revert a change that was committed by error.
  MacGui: disable security-scoped bookmarks resolution in the XPC service.
parents c065b99e 3b6e6822
......@@ -35,6 +35,14 @@ NS_ASSUME_NONNULL_BEGIN
+ (void)writeErrorToActivityLog:(NSError *)error;
+ (void)writeToActivityLogWithNoHeader:(NSString *)text;
/**
Whether to resolve the security-scoped bookmarks or not.
Security-scoped bookmarks can't be resolved in a XPC service.
Use this options to avoid not useful errors
*/
@property (nonatomic, class, readwrite) BOOL resolveBookmarks;
+ (nullable NSURL *)URLFromBookmark:(NSData *)bookmark;
+ (nullable NSData *)bookmarkFromURL:(NSURL *)url;
+ (nullable NSData *)bookmarkFromURL:(NSURL *)url options:(NSURLBookmarkCreationOptions)options;
......
......@@ -9,6 +9,8 @@
#include "lang.h"
static BOOL hb_resolveBookmarks = YES;
@implementation HBUtilities
+ (NSString *)handBrakeVersion
......@@ -73,8 +75,23 @@
fprintf(stderr, "%s", text.UTF8String);
}
+ (void)setResolveBookmarks:(BOOL)resolveBookmarks
{
hb_resolveBookmarks = resolveBookmarks;
}
+ (BOOL)resolveBookmarks
{
return hb_resolveBookmarks;
}
+ (nullable NSURL *)URLFromBookmark:(NSData *)bookmark
{
if (hb_resolveBookmarks == NO)
{
return nil;
}
NSParameterAssert(bookmark);
NSError *error;
......
......@@ -5,6 +5,8 @@
#import <Foundation/Foundation.h>
#import "HandBrakeXPCService.h"
@import HandBrakeKit;
@interface HBXPCServiceDelegate : NSObject <NSXPCListenerDelegate>
@end
......@@ -27,6 +29,8 @@
int main(int argc, const char *argv[])
{
HBUtilities.resolveBookmarks = NO;
HBXPCServiceDelegate *delegate = [HBXPCServiceDelegate new];
NSXPCListener *listener = [NSXPCListener serviceListener];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment