Free, open-source file converter. Convert 263 formats offline by drag & drop — images, PDF, Word, Excel, PowerPoint, HWP/HWPX, video, audio, e-books and archives. No upload, no Office needed.
C# audio-converteravaloniabatch-conversionconvertercsharpdocument-converterdocx-to-pdfdotnetdrag-and-dropfile-conversionfile-converterheic-converterhwphwpximage-converterlinuxmacospdf-convertervideo-converterwindows
Own message for a rolled-back Linux update; sweep only on Linux
KnifeLemon853cb1a732aa
diff --git a/src/Filee.App/App.axaml.cs b/src/Filee.App/App.axaml.csindex 712d3979..ff84c26b 100644--- a/src/Filee.App/App.axaml.cs+++ b/src/Filee.App/App.axaml.cs@@ -218,9 +218,10 @@ public partial class App : Applicationstore.SaveSettings();AppHost.Get<WindowService>().ShowUpdateNotice(version);};- updates.UpdateFailed += async (_, _) => await AppHost.Get<WindowService>().ShowUpdateFailedAsync(updates.LastFailureLogPath);+ updates.UpdateFailed += async (_, _) => await AppHost.Get<WindowService>().ShowUpdateFailedAsync();+ // The last run's update failed after Filee closed (Linux): the installer rolled back and started this copy.if (updates.CheckPendingFailure(store.Directory))- Dispatcher.UIThread.Post(async () => await AppHost.Get<WindowService>().ShowUpdateFailedAsync(updates.LastFailureLogPath));+ Dispatcher.UIThread.Post(async () => await AppHost.Get<WindowService>().ShowUpdateRolledBackAsync(updates.LastFailureLogPath));updates.StartPeriodicChecks(() => store.Settings.CheckForUpdates, TimeSpan.FromSeconds(20));DispatcherTimer.RunOnce(() => NotifyEngineUpdates(store), TimeSpan.FromSeconds(25));}diff --git a/src/Filee.App/Assets/i18n/ar.json b/src/Filee.App/Assets/i18n/ar.jsonindex 7350a25e..65b0a74f 100644--- a/src/Filee.App/Assets/i18n/ar.json+++ b/src/Filee.App/Assets/i18n/ar.json@@ -306,6 +306,8 @@"update.installing": "أداة التثبيت قيد التشغيل. سيبدأ Filee مجددًا عند اكتمالها.","update.failed": "تعذّر التحديث تلقائيًا. نزّل الإصدار الجديد من filee.sh.","update.failed_alert": "تعذّر تنزيل التحديث.\nاضغط على «موافق» لفتح filee.sh وتنزيل الإصدار الجديد منه.",+ "update.rolled_back_alert": "تعذّر تثبيت التحديث، لذا أبقى Filee على الإصدار الذي كان لديك.\nاضغط على «موافق» لفتح filee.sh وتنزيل الإصدار الجديد منه.",+ "update.rolled_back_log": "التفاصيل في السجل: {0}","update.cancelled": "أُلغي التحديث. اضغط على «تحديث» مجددًا لتثبيته.","update.level.Required": "تحديث ضروري","update.level.Recommended": "تحديث موصى به",diff --git a/src/Filee.App/Assets/i18n/en.json b/src/Filee.App/Assets/i18n/en.jsonindex d6da2e01..2862f45e 100644--- a/src/Filee.App/Assets/i18n/en.json+++ b/src/Filee.App/Assets/i18n/en.json@@ -318,6 +318,8 @@"update.installing": "The installer is running. Filee starts again when it is done.","update.failed": "Couldn't update automatically. Download the new version from filee.sh.","update.failed_alert": "Couldn't download the update.\nPress OK to open filee.sh and download the new version there.",+ "update.rolled_back_alert": "Couldn't install the update, so Filee kept the version you had.\nPress OK to open filee.sh and download the new version there.",+ "update.rolled_back_log": "Details are in the log: {0}","update.cancelled": "Update cancelled. Press Update again to install it.","update.level.Required": "Required update","update.level.Recommended": "Recommended update",diff --git a/src/Filee.App/Assets/i18n/es.json b/src/Filee.App/Assets/i18n/es.jsonindex 46d0a29d..b72c5684 100644--- a/src/Filee.App/Assets/i18n/es.json+++ b/src/Filee.App/Assets/i18n/es.json@@ -306,6 +306,8 @@"update.installing": "El instalador se está ejecutando. Filee se reinicia cuando termina.","update.failed": "No se pudo actualizar automáticamente. Descarga la versión nueva en filee.sh.","update.failed_alert": "No se pudo descargar la actualización.\nPulsa Aceptar para abrir filee.sh y descargar allí la versión nueva.",+ "update.rolled_back_alert": "No se pudo instalar la actualización, así que Filee conservó la versión que tenías.\nPulsa Aceptar para abrir filee.sh y descargar allí la versión nueva.",+ "update.rolled_back_log": "Los detalles están en el registro: {0}","update.cancelled": "Actualización cancelada. Pulsa Actualizar otra vez para instalarla.","update.level.Required": "Actualización obligatoria","update.level.Recommended": "Actualización recomendada",diff --git a/src/Filee.App/Assets/i18n/fr.json b/src/Filee.App/Assets/i18n/fr.jsonindex 5e3a7d67..a9c7bac8 100644--- a/src/Filee.App/Assets/i18n/fr.json+++ b/src/Filee.App/Assets/i18n/fr.json@@ -318,6 +318,8 @@"update.installing": "Le programme d'installation est en cours. Filee redémarre une fois terminé.","update.failed": "Impossible de mettre à jour automatiquement. Téléchargez la nouvelle version sur filee.sh.","update.failed_alert": "Impossible de télécharger la mise à jour.\nAppuyez sur OK pour ouvrir filee.sh et y télécharger la nouvelle version.",+ "update.rolled_back_alert": "Impossible d'installer la mise à jour : Filee a gardé la version que vous aviez.\nAppuyez sur OK pour ouvrir filee.sh et y télécharger la nouvelle version.",+ "update.rolled_back_log": "Les détails figurent dans le journal : {0}","update.cancelled": "Mise à jour annulée. Appuyez à nouveau sur Mettre à jour pour l'installer.","update.level.Required": "Mise à jour obligatoire","update.level.Recommended": "Mise à jour recommandée",diff --git a/src/Filee.App/Assets/i18n/hi.json b/src/Filee.App/Assets/i18n/hi.jsonindex ee9731ca..9def7be1 100644--- a/src/Filee.App/Assets/i18n/hi.json+++ b/src/Filee.App/Assets/i18n/hi.json@@ -306,6 +306,8 @@"update.installing": "इंस्टॉलर चल रहा है। पूरा होने पर Filee फिर शुरू हो जाएगा।","update.failed": "अपने-आप अपडेट नहीं हो सका। नया संस्करण filee.sh से डाउनलोड करें।","update.failed_alert": "अपडेट डाउनलोड नहीं हो सका।\nfilee.sh खोलने और वहाँ से नया संस्करण डाउनलोड करने के लिए “ठीक है” दबाएँ।",+ "update.rolled_back_alert": "अपडेट इंस्टॉल नहीं हो सका, इसलिए Filee ने आपका पिछला संस्करण बनाए रखा।\nfilee.sh खोलने और वहाँ से नया संस्करण डाउनलोड करने के लिए “ठीक है” दबाएँ।",+ "update.rolled_back_log": "विवरण लॉग में है: {0}","update.cancelled": "अपडेट रद्द किया गया। इंस्टॉल करने के लिए फिर से अपडेट दबाएँ।","update.level.Required": "ज़रूरी अपडेट","update.level.Recommended": "अनुशंसित अपडेट",diff --git a/src/Filee.App/Assets/i18n/ja.json b/src/Filee.App/Assets/i18n/ja.jsonindex 9ebf86df..59140afe 100644--- a/src/Filee.App/Assets/i18n/ja.json+++ b/src/Filee.App/Assets/i18n/ja.json@@ -306,6 +306,8 @@"update.installing": "インストーラーを実行中です。完了するとFileeが再起動します。","update.failed": "自動更新に失敗しました。filee.shから新しいバージョンをダウンロードしてください。","update.failed_alert": "更新をダウンロードできませんでした。\n「OK」を押すとfilee.shを開き、新しいバージョンをダウンロードできます。",+ "update.rolled_back_alert": "更新をインストールできなかったため、Filee はこれまでのバージョンのままです。\n「OK」を押すとfilee.shを開き、新しいバージョンをダウンロードできます。",+ "update.rolled_back_log": "詳細はログにあります:{0}","update.cancelled": "更新をキャンセルしました。インストールするには、もう一度「更新」を押してください。","update.level.Required": "必須の更新","update.level.Recommended": "推奨の更新",diff --git a/src/Filee.App/Assets/i18n/ko.json b/src/Filee.App/Assets/i18n/ko.jsonindex 0ed433f0..ec327ab7 100644--- a/src/Filee.App/Assets/i18n/ko.json+++ b/src/Filee.App/Assets/i18n/ko.json@@ -318,6 +318,8 @@"update.installing": "설치 프로그램이 열렸어요. 설치가 끝나면 Filee가 다시 켜져요.","update.failed": "자동 업데이트가 안 됐어요. filee.sh에서 새 버전을 받아 주세요.","update.failed_alert": "업데이트를 받지 못했어요.\n확인을 누르면 filee.sh를 열어 드릴게요. 거기서 새 버전을 받을 수 있어요.",+ "update.rolled_back_alert": "업데이트를 설치하지 못해서 쓰던 버전을 그대로 뒀어요.\n확인을 누르면 filee.sh를 열어 드릴게요. 거기서 새 버전을 받을 수 있어요.",+ "update.rolled_back_log": "자세한 내용은 로그에 있어요: {0}","update.cancelled": "업데이트를 취소했어요. 다시 누르면 설치해요.","update.level.Required": "필수 업데이트","update.level.Recommended": "권장 업데이트",diff --git a/src/Filee.App/Assets/i18n/ne.json b/src/Filee.App/Assets/i18n/ne.jsonindex b94e0043..b9310384 100644--- a/src/Filee.App/Assets/i18n/ne.json+++ b/src/Filee.App/Assets/i18n/ne.json@@ -306,6 +306,8 @@"update.installing": "स्थापनाकर्ता चलिरहेको छ। पूरा भएपछि Filee फेरि सुरु हुनेछ।","update.failed": "स्वचालित रूपमा अपडेट गर्न सकिएन। नयाँ संस्करण filee.sh बाट डाउनलोड गर्नुहोस्।","update.failed_alert": "अपडेट डाउनलोड गर्न सकिएन।\nfilee.sh खोल्न र त्यहाँबाट नयाँ संस्करण डाउनलोड गर्न 'ठीक छ' थिच्नुहोस्।",+ "update.rolled_back_alert": "अपडेट इन्स्टल गर्न सकिएन, त्यसैले Filee ले तपाईंको पुरानो संस्करण नै राख्यो।\nfilee.sh खोल्न र त्यहाँबाट नयाँ संस्करण डाउनलोड गर्न 'ठीक छ' थिच्नुहोस्।",+ "update.rolled_back_log": "विवरण लगमा छ: {0}","update.cancelled": "अपडेट रद्द गरियो। स्थापना गर्न फेरि अपडेट थिच्नुहोस्।","update.level.Required": "आवश्यक अपडेट","update.level.Recommended": "सिफारिस गरिएको अपडेट",diff --git a/src/Filee.App/Assets/i18n/pl.json b/src/Filee.App/Assets/i18n/pl.jsonindex 6dfe83f6..8a41889b 100644--- a/src/Filee.App/Assets/i18n/pl.json+++ b/src/Filee.App/Assets/i18n/pl.json@@ -318,6 +318,8 @@"update.installing": "Instalator działa. Filee uruchomi się ponownie po zakończeniu.","update.failed": "Nie udało się zaktualizować automatycznie. Pobierz nową wersję z filee.sh.","update.failed_alert": "Nie udało się pobrać aktualizacji.\nNaciśnij OK, aby otworzyć filee.sh i pobrać tam nową wersję.",+ "update.rolled_back_alert": "Nie udało się zainstalować aktualizacji, więc Filee zachował dotychczasową wersję.\nNaciśnij OK, aby otworzyć filee.sh i pobrać tam nową wersję.",+ "update.rolled_back_log": "Szczegóły są w dzienniku: {0}","update.cancelled": "Aktualizacja anulowana. Naciśnij Aktualizuj ponownie, aby ją zainstalować.","update.level.Required": "Wymagana aktualizacja","update.level.Recommended": "Zalecana aktualizacja",diff --git a/src/Filee.App/Assets/i18n/pt-BR.json b/src/Filee.App/Assets/i18n/pt-BR.jsonindex de22e05e..b0409006 100644--- a/src/Filee.App/Assets/i18n/pt-BR.json+++ b/src/Filee.App/Assets/i18n/pt-BR.json@@ -318,6 +318,8 @@"update.installing": "O instalador está em execução. O Filee inicia de novo quando terminar.","update.failed": "Não foi possível atualizar automaticamente. Baixe a nova versão em filee.sh.","update.failed_alert": "Não foi possível baixar a atualização.\nPressione OK para abrir filee.sh e baixar a nova versão lá.",+ "update.rolled_back_alert": "Não foi possível instalar a atualização, então o Filee manteve a versão que você tinha.\nPressione OK para abrir filee.sh e baixar a nova versão lá.",+ "update.rolled_back_log": "Os detalhes estão no registro: {0}","update.cancelled": "Atualização cancelada. Pressione Atualizar de novo para instalar.","update.level.Required": "Atualização obrigatória","update.level.Recommended": "Atualização recomendada",diff --git a/src/Filee.App/Assets/i18n/ru.json b/src/Filee.App/Assets/i18n/ru.jsonindex fdef315d..9fa13eff 100644--- a/src/Filee.App/Assets/i18n/ru.json+++ b/src/Filee.App/Assets/i18n/ru.json@@ -318,6 +318,8 @@"update.installing": "Идёт установка. Когда она закончится, Filee запустится снова.","update.failed": "Не удалось обновиться автоматически. Скачайте новую версию с filee.sh.","update.failed_alert": "Не удалось скачать обновление.\nНажмите OK, чтобы открыть filee.sh и скачать новую версию там.",+ "update.rolled_back_alert": "Не удалось установить обновление, поэтому Filee оставил прежнюю версию.\nНажмите OK, чтобы открыть filee.sh и скачать новую версию там.",+ "update.rolled_back_log": "Подробности в журнале: {0}","update.cancelled": "Обновление отменено. Нажмите «Обновить» ещё раз, чтобы установить его.","update.level.Required": "Обязательное обновление","update.level.Recommended": "Рекомендуемое обновление",diff --git a/src/Filee.App/Assets/i18n/th.json b/src/Filee.App/Assets/i18n/th.jsonindex dafee331..94c15132 100644--- a/src/Filee.App/Assets/i18n/th.json+++ b/src/Filee.App/Assets/i18n/th.json@@ -306,6 +306,8 @@"update.installing": "ตัวติดตั้งกำลังทำงาน Filee จะเปิดใหม่อีกครั้งเมื่อเสร็จสิ้น","update.failed": "ไม่สามารถอัปเดตอัตโนมัติได้ ดาวน์โหลดเวอร์ชันใหม่ได้ที่ filee.sh","update.failed_alert": "ไม่สามารถดาวน์โหลดการอัปเดตได้\nกดตกลงเพื่อเปิด filee.sh และดาวน์โหลดเวอร์ชันใหม่ที่นั่น",+ "update.rolled_back_alert": "ไม่สามารถติดตั้งการอัปเดตได้ Filee จึงยังใช้เวอร์ชันเดิมของคุณ\nกดตกลงเพื่อเปิด filee.sh และดาวน์โหลดเวอร์ชันใหม่ที่นั่น",+ "update.rolled_back_log": "ดูรายละเอียดได้ในบันทึกข้อผิดพลาด: {0}","update.cancelled": "การอัปเดตถูกยกเลิก กดอัปเดตอีกครั้งเพื่อทำการติดตั้ง","update.level.Required": "การอัปเดตที่จำเป็น","update.level.Recommended": "การอัปเดตที่แนะนำ",diff --git a/src/Filee.App/Assets/i18n/zh-CN.json b/src/Filee.App/Assets/i18n/zh-CN.jsonindex 04342f28..1aa872d3 100644--- a/src/Filee.App/Assets/i18n/zh-CN.json+++ b/src/Filee.App/Assets/i18n/zh-CN.json@@ -318,6 +318,8 @@"update.installing": "安装程序正在运行,完成后 Filee 会重新启动。","update.failed": "无法自动更新,请从 filee.sh 下载新版本。","update.failed_alert": "无法下载更新。\n点击“确定”后会打开 filee.sh,可以在那里下载新版本。",+ "update.rolled_back_alert": "无法安装更新,Filee 保留了原来的版本。\n点击“确定”后会打开 filee.sh,可以在那里下载新版本。",+ "update.rolled_back_log": "详细信息见日志 {0}","update.cancelled": "已取消更新,再次点击“更新”即可安装。","update.level.Required": "必要更新","update.level.Recommended": "建议更新",diff --git a/src/Filee.App/Assets/i18n/zh-TW.json b/src/Filee.App/Assets/i18n/zh-TW.jsonindex f63d6a08..6f9c6f1d 100644--- a/src/Filee.App/Assets/i18n/zh-TW.json+++ b/src/Filee.App/Assets/i18n/zh-TW.json@@ -318,6 +318,8 @@"update.installing": "安裝程式正在執行,完成後 Filee 會重新啟動。","update.failed": "無法自動更新,請從 filee.sh 下載新版本。","update.failed_alert": "無法下載更新。\n點擊「確定」後會開啟 filee.sh,可以在那裡下載新版本。",+ "update.rolled_back_alert": "無法安裝更新,Filee 保留了原本的版本。\n點擊「確定」後會開啟 filee.sh,可以在那裡下載新版本。",+ "update.rolled_back_log": "詳細資訊見記錄檔 {0}","update.cancelled": "已取消更新,再次點擊「更新」即可安裝。","update.level.Required": "必要更新","update.level.Recommended": "建議更新",diff --git a/src/Filee.App/Services/UpdateService.cs b/src/Filee.App/Services/UpdateService.csindex 1c750490..45a0459e 100644--- a/src/Filee.App/Services/UpdateService.cs+++ b/src/Filee.App/Services/UpdateService.cs@@ -1075,6 +1075,10 @@ public sealed partial class UpdateService : ObservableObject/// </summary>public static void DeleteStaleWorkspaces(string? root = null, TimeSpan? age = null, ILogger? log = null){+ // Workspaces are only made on Linux, under Filee's own data folder. Elsewhere the default root is the shared+ // temp folder, where other programs' folders live.+ if (root is null && !OperatingSystem.IsLinux())+ return;var threshold = age ?? TimeSpan.FromDays(1);try{diff --git a/src/Filee.App/Services/WindowService.cs b/src/Filee.App/Services/WindowService.csindex 54fac612..0272d578 100644--- a/src/Filee.App/Services/WindowService.cs+++ b/src/Filee.App/Services/WindowService.cs@@ -321,12 +321,23 @@ public sealed class WindowService(ILocalizer loc, IServiceProvider services, Mempublic Task MessageAsync(Window? owner, string message) => ShowMessageAsync(owner, message, destructive: false, withCancel: false);/// <summary>The in-app update failed: say so, then open the website to download the new version there.</summary>- public async Task ShowUpdateFailedAsync(string? logPath = null)+ public async Task ShowUpdateFailedAsync(){_updateNotice?.Close();- var message = loc["update.failed_alert"];+ await MessageAsync(_main is { IsVisible: true } main ? main : null, loc["update.failed_alert"]);+ services.GetRequiredService<UpdateService>().OpenDownloadPage();+ }++ /// <summary>+ /// The last run's in-app update (Linux) failed while installing and the installer put the old version back: say so,+ /// with the log that has the details, then open the website to download the new version there.+ /// </summary>+ public async Task ShowUpdateRolledBackAsync(string? logPath)+ {+ _updateNotice?.Close();+ var message = loc["update.rolled_back_alert"];if (!string.IsNullOrWhiteSpace(logPath))- message += $"\n\nLog: {logPath}";+ message += "\n\n" + loc.Format("update.rolled_back_log", logPath);await MessageAsync(_main is { IsVisible: true } main ? main : null, message);services.GetRequiredService<UpdateService>().OpenDownloadPage();}diff --git a/tests/Filee.App.Tests/UpdateServiceTests.cs b/tests/Filee.App.Tests/UpdateServiceTests.csindex 7f0ee7d9..edc832f3 100644--- a/tests/Filee.App.Tests/UpdateServiceTests.cs+++ b/tests/Filee.App.Tests/UpdateServiceTests.cs@@ -486,7 +486,8 @@ public class UpdateServiceTestsupdates.StartProcess = psi =>{processes.Add(psi);- return Process.Start(new ProcessStartInfo("true") { UseShellExecute = false });+ // No real process: `true` is missing on Windows without Git's tools on PATH.+ return null;};await updates.UpdateAsync();