Skip to content

fix: clear cache on disable to prevent stale skip on re-enable - #5

Open
liooooo29 wants to merge 1 commit into
ignaci0:mainfrom
liooooo29:fix/disable-cache-sync-delete
Open

fix: clear cache on disable to prevent stale skip on re-enable#5
liooooo29 wants to merge 1 commit into
ignaci0:mainfrom
liooooo29:fix/disable-cache-sync-delete

Conversation

@liooooo29

Copy link
Copy Markdown

Problem

disable() deletes all desktop launcher files but leaves the cache intact. On re-enable, rescan() calls addAppImage() which checks the cache, finds stale entries, and skips recreation — permanently losing all desktop icons until the user manually clears the cache file.

Steps to reproduce:

  1. Extension is active with desktop files created
  2. Run gnome-extensions disable appimage-manager@ignaci0
  3. Run gnome-extensions enable appimage-manager@ignaci0
  4. All desktop icons are gone, logs show: Skipping already cached AppImage

Fix

Synchronously delete the cache file after removing launchers in disable(), so that enable() performs a fresh scan and recreates all desktop files.

disable() deletes all desktop launcher files but leaves the cache intact.
On re-enable, rescan() calls addAppImage() which checks the cache, finds
stale entries, and skips recreation — permanently losing all desktop icons.

Synchronously delete the cache file after removing launchers so that
enable() performs a fresh scan and recreates all desktop files.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant