Skip to content

Conversation

@bastimeyer
Copy link
Contributor

Fixes #252

The release asset matching is currently broken on main, as it compares against the browser_download_url instead of name, which can make the AppImage's update pattern accidentally match the repo name in the download URL instead of just the release asset names, leading to a wrong asset selection when trying to update. I have described the issue in detail in #252.

This incorrect matching in the URL is only possible because of the added asterisk char * at the beginning of the pattern a few lines above my changes, here:

// not ideal, but allows for returning a match for the entire line
auto pattern = "*" + filename;

I was not sure if you'd want to keep this for compatibility reasons, so I didn't change it.

The AppImage spec however explicitly mentions the file name for matching, not the download URL, so maybe this should be removed, considering the spec's pattern example.

In regards to the sorting at the bottom that is based on the browser_download_url value, that should be fine, as it's the same sorting result after only adding the entries with a matching name to the matchingUrls.

I have validated these changes and the current version from main on a temporary test repo (with a renamed repo while using the main version, for proving the issue).

@TheAssassin TheAssassin force-pushed the fix/gh-releases-zsync/name-property branch from 3395e62 to 40e02e7 Compare September 25, 2025 23:06
Use the `name` property instead of `browser_download_url`
from the GitHub API response for matching the update file pattern.
@TheAssassin
Copy link
Member

Good catch, thanks. I don't know what the motivation was back then. (Maybe this was at a time when this other key did not exist...?)

@TheAssassin TheAssassin enabled auto-merge (rebase) September 25, 2025 23:11
@TheAssassin TheAssassin merged commit 697e583 into AppImageCommunity:main Sep 25, 2025
5 checks passed
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.

gh-releases-zsync: don't match glob pattern against the browser_download_url

2 participants