Never mistake an entry edited in place for one we generated
A desktop entry that already lives in ~/.local/share/applications is the user's own file, patched in place with the original kept aside. It used to get the same X-MCA-Generated marker as a shadow copy, which made the next scan skip it, fall back to the system entry, and overwrite the user's file with a shadow - and then delete it on revert instead of restoring it. The two cases now carry different markers. Only a shadow is skipped by the scan and deleted when undoing; an entry patched in place stays in the scan and is restored from its backup. Also: resolve the applications screen's labels once instead of per row per keypress, and drop code nothing calls.
This commit is contained in:
1 parent
d3c82fdff8
commit
5b1fc84710
10 files changed
+63
-60
No files matched your search
+1
-3
@@ -18,7 +18,6 @@
|
||||
# The file comes back on every client update, and the watcher re-applies the
|
||||
# patch when that happens.
|
||||
|
||||
MCA_STEAM_EXEC='exec ./steamwebhelper "$@"'
|
||||
MCA_STEAM_LAUNCH_FLAG='-noverifyfiles'
|
||||
|
||||
# Every place a Steam installation is known to live, resolved and de-duplicated
|
||||
@@ -106,7 +105,7 @@ mca_steam_apply() {
|
||||
script="$(mca_steam_script "$root")" || continue
|
||||
found=1
|
||||
|
||||
mca_steam_script_patched "$script" && { MCA_TOUCHED+=("$script"); continue; }
|
||||
mca_steam_script_patched "$script" && continue
|
||||
|
||||
lineno="$(_mca_steam_exec_line "$script")"
|
||||
if [[ -z $lineno ]]; then
|
||||
@@ -125,7 +124,6 @@ mca_steam_apply() {
|
||||
fi
|
||||
chmod +x -- "$script" 2>/dev/null || true
|
||||
mca_ledger_add steam "$script" "$backup"
|
||||
MCA_TOUCHED+=("$script")
|
||||
done < <(mca_steam_roots)
|
||||
|
||||
(( found ))
|
||||
|
||||
Reference in new issue
Block a user