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:
+14
-1
@@ -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(())
|
||||
|
||||
Reference in New Issue
Block a user