Skip to content

Comments

Fix: Handle invalid desktop files gracefully and prevent duplicate entries#9

Open
PGupta-Git wants to merge 1 commit intoimoize:mainfrom
PGupta-Git:fix/handle-invalid-desktop-files
Open

Fix: Handle invalid desktop files gracefully and prevent duplicate entries#9
PGupta-Git wants to merge 1 commit intoimoize:mainfrom
PGupta-Git:fix/handle-invalid-desktop-files

Conversation

@PGupta-Git
Copy link

@PGupta-Git PGupta-Git commented Jan 16, 2026

This commit addresses two critical bugs in Flickernaut and fixes the issue that I opened #10:

  1. Extension crash with invalid desktop files (Critical)

    • Added try-except error handling in Package.init to gracefully handle NULL returns from Gio.DesktopAppInfo.new()
    • Wrapped Application creation in try-except in manager.py to skip invalid applications during initialisation instead of crashing
    • Prevents complete extension failure when a configured app's desktop file doesn't exist
  2. Duplicate entries in the preferences app chooser

    • Changed show_all from true to false in AppDialog (application.ts)
    • This respects the NoDisplay=true setting in URL handler desktop files
    • Prevents apps like Positron and Antigravity from appearing twice (once for the main app, once for the URL handler)

Files modified:

  • nautilus-extension/Flickernaut/models.py: Error handling for NULL desktop files
  • nautilus-extension/Flickernaut/manager.py: Skip invalid apps during init
  • src/prefs/application.ts: Respect NoDisplay=true setting

Fixes: Extension crashes, preventing all context menus from appearing
Fixes: Duplicate application entries in preferences dialogue

@PGupta-Git PGupta-Git changed the title Fix: Handle invalid desktop files gracefully and prevent duplicate en… Fix: Handle invalid desktop files gracefully and prevent duplicate entries Jan 16, 2026
…tries

This commit addresses two critical bugs in Flickernaut:

1. Extension crash with invalid desktop files (Critical)
   - Added try-except error handling in Package.__init__ to gracefully
     handle NULL returns from Gio.DesktopAppInfo.new()
   - Wrapped Application creation in try-except in manager.py to skip
     invalid applications during initialization instead of crashing
   - Prevents complete extension failure when a configured app's
     desktop file doesn't exist

2. Duplicate entries in preferences app chooser
   - Changed show_all from true to false in AppDialog (application.ts)
   - This respects the NoDisplay=true setting in URL handler desktop files
   - Prevents apps like Positron and Antigravity from appearing twice
     (once for main app, once for URL handler)

Files modified:
- nautilus-extension/Flickernaut/models.py: Error handling for NULL desktop files
- nautilus-extension/Flickernaut/manager.py: Skip invalid apps during init
- src/prefs/application.ts: Respect NoDisplay=true setting

Fixes: Extension crashes preventing all context menus from appearing
Fixes: Duplicate application entries in preferences dialog
@PGupta-Git PGupta-Git force-pushed the fix/handle-invalid-desktop-files branch from 2d9f91d to 7c8e3b5 Compare January 16, 2026 12:26
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