feat(files): confirm dropped files and refuse the ones already installed
A drop — or "Ouvrir avec PacManager" — answered nothing: a Flatpak install walked off into the background and a plugin package landed without a sound, so the gesture read as ignored. Both now open a dialog saying what was taken and what it starts. A file the machine already has is refused before anything runs, and named. The application a file would install is read out of the file itself (the [Flatpak Ref] section of a .flatpakref, the header of a .flatpak bundle, the manifest of a .fwspacm) and compared with what the provider has, so nothing is started to find out: Flatpak would otherwise skip the install and report a success the user never got, and a plugin package would silently replace the one in place.
This commit is contained in:
16 files changed
+557
-9
No files matched your search
@@ -96,6 +96,7 @@ Copiez `providers/example-provider/example-provider.cpp` comme point de départ.
|
||||
| `canListCleanup()`, `listCleanupCandidates()`, `canCleanCache()`, `cleanCache()` | non | Page Nettoyage. Un fournisseur qui ne les implémente pas est simplement ignoré. |
|
||||
| `removePackages(names, callback)` | non | Suppression groupée en une commande. Le défaut (un `remove()` par entrée) convient aux `target` d'un paquet installé plusieurs fois (voir plus bas). |
|
||||
| `canInstallFile(path)`, `installFile(path, callback)` | non | Installation depuis un fichier du bureau (glisser-déposer, « Ouvrir avec PacManager »). Le fournisseur ne revendique que **ses** formats : Flatpak accepte `.flatpakref`, `.flatpakrepo` et `.flatpak`, et ignore le reste. |
|
||||
| `fileTargetName(path)`, `isPackageInstalled(name)` | non | L'application qu'un fichier installerait, et si elle est déjà là. Lue dans le fichier sans rien exécuter (section `[Flatpak Ref]` d'une référence, en-tête d'un bundle), pour refuser un fichier déjà installé au lieu de lancer une installation qui ne ferait rien. Une chaîne vide (dépôt, format inconnu, fichier illisible) signifie « rien à comparer » : le fichier s'installe normalement. |
|
||||
|
||||
`update("")` signifie **tout mettre à jour** : c'est ce que le worker appelle pour
|
||||
l'opération globale.
|
||||
|
||||
Reference in new issue
Block a user