mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-06-28 11:00:28 +12:00
Require macos applications to be in some applications directory
This commit is contained in:
parent
88086dc322
commit
8a684caf1b
|
@ -65,13 +65,9 @@ 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()) {
|
||||
return app.map(Path::of);
|
||||
}
|
||||
|
||||
return valid.stream().findFirst().map(Path::of);
|
||||
// Require app in proper applications directory
|
||||
var app = valid.stream().filter(s -> s.contains("Applications")).findFirst();
|
||||
return app.map(Path::of);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
ErrorEvent.fromThrowable(e).omit().handle();
|
||||
|
|
Loading…
Reference in a new issue