fix #14740: faster update retries and release safety checks

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
hauke
2026-11-06 11:50:43 +01:00
co-authored by Claude Opus 5.5
parent bda584deda
commit c7811b75ae
4 changed files with 232 additions and 22 deletions
+14 -1
View File
@@ -48,6 +48,13 @@ pub fn run() {
.level(log::LevelFilter::Info)
// flacenc logs per-encode statistics at Info.
.level_for("flacenc", log::LevelFilter::Warn)
// The updater plugin logs an Error for every endpoint
// that fails, also for the expected 404 of a feed URL
// that is not served while the other one is. Every
// check and install result reaches `updater`, which
// logs it (failed checks at Info, failed installs at
// Error), so the plugin's own lines are dropped.
.level_for("tauri_plugin_updater", log::LevelFilter::Off)
.max_file_size(LOG_FILE_SIZE)
.rotation_strategy(RotationStrategy::KeepSome(2))
.timezone_strategy(TimezoneStrategy::UseLocal)
@@ -72,6 +79,10 @@ pub fn run() {
Vec::new()
});
let autostart = state.settings().autostart;
let new_version = updater::first_start_of_version(
&config_dir.join("last-version"),
&app.package_info().version.to_string(),
);
// Before anything can start a run.
processing::clear_upload_dir(app.handle());
app.manage(state);
@@ -88,7 +99,9 @@ pub fn run() {
tray::create(app.handle())?;
detection::spawn(app.handle().clone());
updater::spawn(app.handle().clone());
if !std::env::args().any(|arg| arg == AUTOSTART_ARG) {
// After an update the installer restarts the app with its old
// arguments; the main window shows the new version even then.
if new_version || !std::env::args().any(|arg| arg == AUTOSTART_ARG) {
commands::show_main(app.handle());
}
Ok(())