mirror of
https://github.com/cryptomator/cryptomator.git
synced 2026-09-11 18:46:38 +00:00
fixing use of desktop features on headless platform
This commit is contained in:
@@ -24,9 +24,13 @@ class FileOpenRequestHandler {
|
||||
|
||||
public FileOpenRequestHandler(BlockingQueue<Path> fileOpenRequests) {
|
||||
this.fileOpenRequests = fileOpenRequests;
|
||||
Desktop.getDesktop().setOpenFileHandler(e -> {
|
||||
e.getFiles().stream().map(File::toPath).forEach(fileOpenRequests::add);
|
||||
});
|
||||
try {
|
||||
Desktop.getDesktop().setOpenFileHandler(e -> {
|
||||
e.getFiles().stream().map(File::toPath).forEach(fileOpenRequests::add);
|
||||
});
|
||||
} catch (UnsupportedOperationException e) {
|
||||
LOG.info("Unable to setOpenFileHandler, probably not supported on this OS.");
|
||||
}
|
||||
}
|
||||
|
||||
public void handleLaunchArgs(String[] args) {
|
||||
|
||||
Reference in New Issue
Block a user