Expand description
Which data channel an AppImage runs in, kept so that moving or renaming the file doesn’t lose it (#47873).
An in-app upgrade records the channel beside the AppImage, as <file>.agentmux-channel
([runtime_mode::appimage_channel_file]). A move or a rename leaves that file behind: AppImageLauncher’s
“Integrate” moves the AppImage into ~/Applications under a new name, and the moved file then came up in
stable, with another channel’s windows and tabs.
So the channel is also kept in a small record in the account-wide shared folder, keyed by which file
the AppImage is, not where it is: the same size and modification time, and, while the old path is still
there, the same file system object (a rename keeps both). A copy that still sits at its old path is another
file, never a move, so a duplicate of a release never takes a channel from its twin. A move that changes
the modification time (a copy across file systems) is not recognised, and the file starts in the channel
built into it, as before.
What a start does with it (reconcile):
- the file’s own record beside it wins, and is remembered here;
- with none beside it, a record of this same file gives the channel, and the record beside the file is written again, so the next start doesn’t need this one;
- with neither, nothing changes.
A record that isn’t a plain channel name is ignored, and so is one that can’t be read.
Structs§
- FileId
- What identifies an AppImage file apart from its path.
- Found
- A record of the file at
appimage: its channel, and the path it was last started from. - Reconciled
- What a start found out about the AppImage it runs from.
Constants§
- RECORD_
FILE - The record, in the account-wide
sharedfolder.
Functions§
- file_id
- The identity of the file at
path. - lookup
- The record of this very file, wherever it was before.
- moved_
channel - The channel recorded for the AppImage at
appimagewhen its own record was left behind by a move. - reconcile
- Bring the records about
appimagein line with where it is now (see the module doc). Best effort: a folder that can’t be written leaves the channel as it was. - record_
path - The record’s place: the account-wide
sharedfolder. - remember
- Remember that the file at
appimageruns inchannel.