fix(sync,gui,cli): get a synced folder unstuck when its local copy is gone (#46)

A mirror folder whose files were all gone from this computer stayed in
error for good. The wipe guard rightly refuses to trash the whole folder
on Drive, but nothing got the folder out of that state: a queued switch
to on-demand waits for a pass that ends idle, and its push pass hit the
same guard. Only removing the folder from sync cleared the baseline that
made the empty folder read as "delete everything".

- The push pass for a switch to on-demand forgets the baseline rows of a
  local copy that is gone in full instead of trashing them, so the
  switch goes ahead and the mount shows what Drive has.
- New Request::ResetSyncFolder, `pdfs sync reset ID` and "Sync From
  Scratch…" in a synced folder's menu clear a mirror folder's baseline
  (and a queued switch to on-demand, whose push pass would upload a
  duplicate of every file). The next pass compares both sides as on the
  first sync: one-sided files are copied across, files that differ keep
  both versions, nothing is deleted.
- The wipe guards' messages name the reset; restore logs why it skipped
  a folder.

Two simulations cover it. The on-demand one failed in exactly the
reported state (mirror, pending ondemand, error) before the fix.
All 8 catalogs translated.
This commit is contained in:
nvrl committed 2026-10-26 17:45:22 +01:00
1 parent ea10a43216
commit a5acae41b3
23 files changed
+832 -238

No files matched your search

+56 -26
View File
@@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: proton-drive-linux 2.1.0\n"
"Report-Msgid-Bugs-To: https://github.com/narrrl/proton-drive-linux/issues\n"
"POT-Creation-Date: 2026-10-25 22:10+0100\n"
"POT-Creation-Date: 2026-10-26 17:16+0100\n"
"PO-Revision-Date: 2026-09-23 12:00+0200\n"
"Last-Translator: Proton Drive for Linux contributors\n"
"Language-Team: French\n"
@@ -64,7 +64,7 @@ msgstr "%A %-d %B %Y à %H:%M"
#: crates/pdfs-gui/src/app/pages/browser.rs:1249
#: crates/pdfs-gui/src/app/pages/browser.rs:2167
#: crates/pdfs-gui/src/app/pages/browser.rs:2246
#: crates/pdfs-gui/src/app/pages/locations.rs:1667
#: crates/pdfs-gui/src/app/pages/locations.rs:1717
#: crates/pdfs-gui/src/app/pages/shared_by_me.rs:252
#: crates/pdfs-gui/src/app/pages/trash.rs:191 crates/pdfs-gui/src/prompt.rs:171
msgid "My files"
@@ -258,8 +258,9 @@ msgstr ""
#: crates/pdfs-gui/src/app/pages/devices.rs:1186
#: crates/pdfs-gui/src/app/pages/locations.rs:850
#: crates/pdfs-gui/src/app/pages/locations.rs:1054
#: crates/pdfs-gui/src/app/pages/locations.rs:1531
#: crates/pdfs-gui/src/app/pages/locations.rs:1537
#: crates/pdfs-gui/src/app/pages/locations.rs:1581
#: crates/pdfs-gui/src/app/pages/locations.rs:1631
#: crates/pdfs-gui/src/app/pages/login.rs:480
#: crates/pdfs-gui/src/app/pages/login.rs:594
#: crates/pdfs-gui/src/app/pages/login.rs:640
@@ -1290,8 +1291,9 @@ msgstr "Impossible de charger les albums"
#: crates/pdfs-gui/src/app/pages/locations.rs:881
#: crates/pdfs-gui/src/app/pages/locations.rs:904
#: crates/pdfs-gui/src/app/pages/locations.rs:1123
#: crates/pdfs-gui/src/app/pages/locations.rs:1623
#: crates/pdfs-gui/src/app/pages/locations.rs:1643
#: crates/pdfs-gui/src/app/pages/locations.rs:1566
#: crates/pdfs-gui/src/app/pages/locations.rs:1673
#: crates/pdfs-gui/src/app/pages/locations.rs:1693
#: crates/pdfs-gui/src/app/pages/photo_viewer.rs:1504
#: crates/pdfs-gui/src/app/pages/photos.rs:1421
#: crates/pdfs-gui/src/app/pages/photos.rs:2141
@@ -2326,7 +2328,8 @@ msgid "Add Folder to Sync"
msgstr "Ajouter un dossier à synchroniser"
#: crates/pdfs-gui/src/app/pages/devices.rs:691
#: crates/pdfs-gui/src/app/pages/locations.rs:1636
#: crates/pdfs-gui/src/app/pages/locations.rs:1559
#: crates/pdfs-gui/src/app/pages/locations.rs:1686
msgid "Syncing folder…"
msgstr "Synchronisation du dossier…"
@@ -3248,16 +3251,41 @@ msgstr "Reprendre la synchronisation"
msgid "Pause Syncing"
msgstr "Mettre en pause la synchronisation"
#: crates/pdfs-gui/src/app/pages/locations.rs:1518
#: crates/pdfs-gui/src/app/pages/locations.rs:1513
msgid "Sync From Scratch…"
msgstr "Resynchroniser depuis le début…"
#: crates/pdfs-gui/src/app/pages/locations.rs:1523
msgid "Stop Syncing…"
msgstr "Arrêter la synchronisation…"
#: crates/pdfs-gui/src/app/pages/locations.rs:1527
#: crates/pdfs-gui/src/app/pages/locations.rs:1533
msgid "Sync From Scratch?"
msgstr "Resynchroniser depuis le début ?"
#. Translators: {path} is a local folder path.
#: crates/pdfs-gui/src/app/pages/locations.rs:1535
#, rust-format
msgid ""
"This computer forgets what it synced in {path} before and compares the "
"folder with Proton Drive again. Nothing is deleted: a file on one side only "
"is copied to the other, and a file that differs keeps both versions."
msgstr "Cet ordinateur oublie ce qu’il a synchronisé auparavant dans {path} et compare à nouveau le dossier avec Proton Drive. Rien n’est supprimé : un fichier présent d’un seul côté est copié de l’autre, et un fichier qui diffère garde ses deux versions."
#: crates/pdfs-gui/src/app/pages/locations.rs:1538
msgid "Sync From Scratch"
msgstr "Resynchroniser depuis le début"
#: crates/pdfs-gui/src/app/pages/locations.rs:1557
msgid "Couldn't sync the folder from scratch"
msgstr "Impossible de resynchroniser le dossier depuis le début"
#: crates/pdfs-gui/src/app/pages/locations.rs:1577
msgid "Make Folder Online Only?"
msgstr "Garder le dossier en ligne uniquement ?"
#. Translators: {path} is a local folder path.
#: crates/pdfs-gui/src/app/pages/locations.rs:1529
#: crates/pdfs-gui/src/app/pages/locations.rs:1579
#, rust-format
msgid ""
"Files in {path} will be removed from this computer and kept in Proton Drive "
@@ -3267,11 +3295,11 @@ msgstr ""
"uniquement dans Proton Drive. Chaque fichier sera à nouveau téléchargé à son "
"ouverture."
#: crates/pdfs-gui/src/app/pages/locations.rs:1532
#: crates/pdfs-gui/src/app/pages/locations.rs:1582
msgid "Make Online Only"
msgstr "Garder en ligne uniquement"
#: crates/pdfs-gui/src/app/pages/locations.rs:1568
#: crates/pdfs-gui/src/app/pages/locations.rs:1618
#, rust-format
msgid ""
"Every file in {path} will download to this computer and stay synced. {free} "
@@ -3280,62 +3308,62 @@ msgstr ""
"Chaque fichier de {path} sera téléchargé sur cet ordinateur et restera "
"synchronisé. {free} sont libres sur ce disque."
#: crates/pdfs-gui/src/app/pages/locations.rs:1573
#: crates/pdfs-gui/src/app/pages/locations.rs:1623
#, rust-format
msgid "Every file in {path} will download to this computer and stay synced."
msgstr ""
"Chaque fichier de {path} sera téléchargé sur cet ordinateur et restera "
"synchronisé."
#: crates/pdfs-gui/src/app/pages/locations.rs:1578
#: crates/pdfs-gui/src/app/pages/locations.rs:1628
msgid "Download Folder?"
msgstr "Télécharger le dossier ?"
#: crates/pdfs-gui/src/app/pages/locations.rs:1582
#: crates/pdfs-gui/src/app/pages/locations.rs:1632
#: crates/pdfs-gui/src/app/update.rs:34
msgid "Download"
msgstr "Télécharger"
#: crates/pdfs-gui/src/app/pages/locations.rs:1606
#: crates/pdfs-gui/src/app/pages/locations.rs:1656
msgid "Couldn't pause the folder"
msgstr "Impossible de mettre en pause le dossier"
#: crates/pdfs-gui/src/app/pages/locations.rs:1607
#: crates/pdfs-gui/src/app/pages/locations.rs:1657
msgid "Couldn't resume the folder"
msgstr "Impossible de reprendre le dossier"
#: crates/pdfs-gui/src/app/pages/locations.rs:1613
#: crates/pdfs-gui/src/app/pages/locations.rs:1663
msgid "Folder paused"
msgstr "Dossier en pause"
#: crates/pdfs-gui/src/app/pages/locations.rs:1614
#: crates/pdfs-gui/src/app/pages/locations.rs:1664
msgid "Folder resumed"
msgstr "Dossier repris"
#: crates/pdfs-gui/src/app/pages/locations.rs:1638
#: crates/pdfs-gui/src/app/pages/locations.rs:1642
#: crates/pdfs-gui/src/app/pages/locations.rs:1688
#: crates/pdfs-gui/src/app/pages/locations.rs:1692
msgid "Couldn't sync"
msgstr "Impossible de synchroniser"
#: crates/pdfs-gui/src/app/pages/locations.rs:1668
#: crates/pdfs-gui/src/app/pages/locations.rs:1718
msgid "Shared folder"
msgstr "Dossier partagé"
#: crates/pdfs-gui/src/app/pages/locations.rs:1670
#: crates/pdfs-gui/src/app/pages/locations.rs:1720
msgid "Going online only"
msgstr "Passage en ligne uniquement"
#: crates/pdfs-gui/src/app/pages/locations.rs:1671
#: crates/pdfs-gui/src/app/pages/locations.rs:1721
msgid "Switching to synced"
msgstr "Passage en mode synchronisé"
#: crates/pdfs-gui/src/app/pages/locations.rs:1681
#: crates/pdfs-gui/src/app/pages/locations.rs:1731
msgctxt "state"
msgid "paused"
msgstr "en pause"
#. Translators: a folder's files can't be opened right now.
#: crates/pdfs-gui/src/app/pages/locations.rs:1692
#: crates/pdfs-gui/src/app/pages/locations.rs:1742
msgid "not available"
msgstr "non disponible"
@@ -5941,7 +5969,9 @@ msgstr "Paramètres du lien"
#: crates/pdfs-gui/src/app/widgets/share_dialog.rs:802
msgid ""
"Change who can edit, the password or the expiry. The link stays the same."
msgstr "Modifiez qui peut modifier, le mot de passe ou l’expiration. Le lien reste le même."
msgstr ""
"Modifiez qui peut modifier, le mot de passe ou l’expiration. Le lien reste "
"le même."
#: crates/pdfs-gui/src/app/widgets/share_dialog.rs:849
msgid "New password"