File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -279,8 +279,8 @@ bool HasOpenSystemPreferencesDialog() {
279279 for (NSString *file in files) {
280280 const std::string can_read = CheckFileAccessLevel (file);
281281 if (can_read == kAuthorized ) {
282- break ;
283282 auth_status = kAuthorized ;
283+ break ;
284284 } else if (can_read == kDenied ) {
285285 auth_status = kDenied ;
286286 }
@@ -294,11 +294,7 @@ bool HasOpenSystemPreferencesDialog() {
294294std::string ScreenAuthStatus () {
295295 std::string auth_status = kNotDetermined ;
296296 if (@available (macOS 10.16 , *)) {
297- if (CGPreflightScreenCaptureAccess ()) {
298- auth_status = kAuthorized ;
299- } else {
300- auth_status = kDenied ;
301- }
297+ auth_status = CGPreflightScreenCaptureAccess () ? kAuthorized : kDenied ;
302298 } else if (@available (macOS 10.15 , *)) {
303299 auth_status = kDenied ;
304300 NSRunningApplication *runningApplication =
You can’t perform that action at this time.
0 commit comments