mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-10-18 23:07:27 +02:00
fix(deep-link): preserve XDG registration ownership and report failures (#3585)
* fix(deep-link): honor XDG failures and unregister associations * test(deep-link): isolate other application handlers * chore: satisfy release metadata and test header checks * fix(deep-link): gate XDG helpers to Linux The plugin only supports Linux, so FreeBSD builds warned about dead code. * refactor(deep-link): add run_command helper Share the spawn, status check and logging for XDG commands. * refactor(deep-link): share desktop file list helpers register and unregister now edit MimeType lists the same way. * fix(deep-link): keep desktop file quoting on register Parse raw values so a quoted Exec matches and isn't rewritten each time. * fix(deep-link): clean mimeapps.list first on unregister A failing update-desktop-database no longer leaves the app as the default. * fix(deep-link): keep mimeapps.list comments on unregister Edit it line by line instead of re-serializing it through rust-ini. * fix(deep-link): skip cache refresh when nothing to unregister Only run update-desktop-database if the desktop file changed or the cache still lists the app. * fix(deep-link): treat no default handler as unregistered xdg-mime exits with 4 on KDE and LXQt when no handler is set. * fix(deep-link): tolerate padded xdg-mime query output Compare the trimmed first line instead of the raw output. * test(deep-link): run XDG tests in CI Drop #[ignore], skip when the tools are missing, and install them on Linux CI. --------- Co-authored-by: Lucas Nogueira <lucas@tauri.app>
This commit is contained in:
1 parent
f83c5d3b0f
commit
2d541bc0d1
7 files changed
+731
-75
No files matched your search
@@ -112,6 +112,8 @@ jobs:
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libwebkit2gtk-4.0-dev libwebkit2gtk-4.1-dev dbus
|
||||
# the deep-link tests drive the real XDG tools
|
||||
sudo apt-get install -y xdg-utils desktop-file-utils
|
||||
|
||||
- uses: dtolnay/rust-toolchain@1.90
|
||||
with:
|
||||
|
||||
Reference in new issue
Block a user