feat: identify AppImages by reading their squashfs name table
Every AppImage came out as "cannot tell" because the payload is a compressed filesystem and none of the Chromium markers is on disk to be found. The names are reachable, though: squashfs keeps the name of everything it holds in one table of a few kilobytes, and a name is all this question needs. That table is now read and inflated in place - nothing is unpacked, and the image is never run, which a scan started by the path unit has no business doing anyway. So a Tauri AppImage such as Modrinth is recognised as WebKitGTK and dropped from the list instead of being offered as something that could be switched on - there is no autoscroll in WebKit to ask for - and an Electron one is covered like any other application. Left as "cannot tell": lzo and lz4, which squashfs stores as bare blocks no tool will read without their own framing, and the original ISO9660 layout. Alongside: - The detect cache carries a format line. Its entries are keyed on size and mtime, so an AppImage that has not changed would otherwise keep answering the way an older version decided it did, forever. - A marker list for whole-tree searches, which is what a Flatpak, a snap and an AppImage need. icudtl.dat, snapshot_blob.bin and resources.pak are out of it: Flutter ships an icudtl.dat in data/, and next to a binary those names are evidence while four directories down they are not. The Flatpak and snap searches now share that list.
This commit is contained in:
1 parent
449a20ce9b
commit
7a446364dc
3 files changed
+434
-43
No files matched your search
@@ -117,6 +117,13 @@ New apps are picked up by a systemd path unit that watches the
|
||||
relevant directories. If you hate systemd; `middleclick-autoscroll apply` does the
|
||||
same thing manually.
|
||||
|
||||
AppImages get looked into as well. The payload is a squashfs image glued onto
|
||||
the runtime, and squashfs keeps a small table with the name of every file in
|
||||
there - so that table gets read and unpacked (a few kb, nothing is extracted
|
||||
and the thing is never run) and the Chromium files are looked for in it. An
|
||||
Electron AppImage is covered like any other app; a Tauri one is left alone,
|
||||
because WebKitGTK simply has no autoscroll to switch on.
|
||||
|
||||
## Commands
|
||||
|
||||
| Command | |
|
||||
|
||||
Reference in new issue
Block a user