apply review suggestions

This commit is contained in:
Sebastian Stenzel
2025-11-04 21:42:14 +01:00
parent 307825a339
commit c3931d9d29
3 changed files with 7 additions and 1 deletions

View File

@@ -119,6 +119,7 @@ public class UpdatesPreferencesController implements FxController {
private void updateFailed(WorkerStateEvent workerStateEvent) {
assert workerStateEvent.getSource() == updateService;
LOG.error("Update failed.", updateService.getException());
updateService.reset();
}
/* Observable Properties */

View File

@@ -66,7 +66,11 @@ public class FallbackUpdateMechanism implements UpdateMechanism<UpdateInfo> {
} else {
return null;
}
} catch (IOException | InterruptedException e) {
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
LOG.warn("Update check interrupted", e);
return null;
} catch (IOException e) {
LOG.warn("Update check failed", e);
return null;
}

View File

@@ -96,6 +96,7 @@ public class MacOsDmgUpdateMechanism extends DownloadUpdateMechanism {
}
LOG.debug("Update ready: {}", workDir.resolve("Cryptomator.app"));
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
throw new InterruptedIOException("Failed to extract DMG, interrupted");
}
return UpdateStep.of("Restarting...", this::restart);