Skip to content

Commit 697e583

Browse files
bastimeyerTheAssassin
authored andcommitted
Fix GithubReleasesUpdateInformation::buildUrl()
Use the `name` property instead of `browser_download_url` from the GitHub API response for matching the update file pattern.
1 parent 0311b1b commit 697e583

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/updateinformation/GithubReleasesZsyncUpdateInformation.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,9 @@ namespace appimage::update::updateinformation {
6363

6464
for (const auto& asset : assets) {
6565
const auto browserDownloadUrl = asset["browser_download_url"].get<std::string>();
66+
const auto name = asset["name"].get<std::string>();
6667

67-
if (fnmatch(pattern.c_str(), browserDownloadUrl.c_str(), 0) == 0) {
68+
if (fnmatch(pattern.c_str(), name.c_str(), 0) == 0) {
6869
matchingUrls.emplace_back(browserDownloadUrl);
6970
}
7071
}

0 commit comments

Comments
 (0)