[release]

This commit is contained in:
crschnick 2023-03-31 15:23:58 +00:00
parent 33836f8690
commit 0d3274b1a4
6 changed files with 24 additions and 5 deletions

View file

@ -52,7 +52,7 @@ public class LocalFileTransferStage {
items.add(item);
executor.submit(() -> {
try {
FileUtils.forceMkdirParent(TEMP.toFile());
FileUtils.forceMkdir(TEMP.toFile());
try (var b = new BusyProperty(downloading)) {
FileSystemHelper.dropFilesInto(FileSystemHelper.getLocal(TEMP), List.of(entry), false);
}

View file

@ -40,6 +40,11 @@ public class UpdateCheckComp extends SimpleComp {
}
private void restart() {
// Check if we're still on latest
if (!AppUpdater.get().isDownloadedUpdateStillLatest()) {
return;
}
AppUpdater.get().executeUpdateAndClose();
}

View file

@ -89,7 +89,7 @@ public class TerminalErrorHandler implements ErrorHandler {
try {
AppUpdater.init();
var rel = AppUpdater.get().checkForUpdate(true);
if (rel.isUpdate()) {
if (rel != null && rel.isUpdate()) {
var update = AppWindowHelper.showBlockingAlert(alert -> {
alert.setAlertType(Alert.AlertType.INFORMATION);
alert.setTitle(AppI18n.get("updateAvailableTitle"));

View file

@ -101,8 +101,9 @@ public class AppUpdater {
ThreadHelper.sleep(Duration.ofMinutes(10).toMillis());
event("Starting background updater thread");
while (true) {
if (INSTANCE.checkForUpdate(false) != null
&& AppPrefs.get().automaticallyUpdate().get()) {
var rel = INSTANCE.checkForUpdate(false);
if (rel != null
&& AppPrefs.get().automaticallyUpdate().get() && rel.isUpdate()) {
event("Performing background update");
INSTANCE.downloadUpdate();
}
@ -226,7 +227,15 @@ public class AppUpdater {
}
public synchronized boolean isDownloadedUpdateStillLatest() {
if (downloadedUpdate.getValue() == null) {
return false;
}
var available = checkForUpdate(true);
if (available == null) {
return true;
}
return downloadedUpdate.getValue() != null
&& available.getVersion().equals(downloadedUpdate.getValue().getVersion());
}

5
dist/changelogs/0.5.28.md vendored Normal file
View file

@ -0,0 +1,5 @@
- Introduce new download functionality in the file browser
- Allow for the creation of desktop shortcuts on portable distributions as well
- Fix file sizes sometimes being incorrectly displayed
- Fix background updater downloading the same version
- Fix various small bugs

View file

@ -1 +1 @@
0.5.27
0.5.28