Skip to content

Commit

Permalink
fix(Library): handle bad file open for invalid desktop entries
Browse files Browse the repository at this point in the history
  • Loading branch information
ShadowApex committed Jan 23, 2025
1 parent dccb967 commit ea0661a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/systems/library/library_desktop.gd
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@ func _desktop_file_to_launch_item(file: String) -> LibraryLaunchItem:
launch_item.installed = true
launch_item.categories = []

logger.debug("Parsing desktop file:", file)
var f := FileAccess.open(file, FileAccess.READ)
if not f:
logger.warn("Unable to open desktop file for parsing:", file)
return null
var text := f.get_as_text()
var lines := text.split("\n")
for line in lines:
Expand Down

0 comments on commit ea0661a

Please sign in to comment.