mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-09-30 00:56:56 +13:00
Require macos applications to be in some applications directory
This commit is contained in:
parent
88086dc322
commit
8a684caf1b
1 changed files with 3 additions and 7 deletions
|
@ -65,14 +65,10 @@ public abstract class ExternalApplicationType implements PrefsChoiceValue {
|
|||
}
|
||||
}).sorted(Comparator.comparingInt(value -> value.length())).toList();
|
||||
|
||||
// Prefer app in proper applications directory
|
||||
var app = valid.stream().filter(s -> s.contains("/Applications")).findFirst();
|
||||
if (app.isPresent()) {
|
||||
// Require app in proper applications directory
|
||||
var app = valid.stream().filter(s -> s.contains("Applications")).findFirst();
|
||||
return app.map(Path::of);
|
||||
}
|
||||
|
||||
return valid.stream().findFirst().map(Path::of);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
ErrorEvent.fromThrowable(e).omit().handle();
|
||||
return Optional.empty();
|
||||
|
|
Loading…
Reference in a new issue