Fix XPI download failure when release tag contains slashes
Tags like "zotero-plugin/v0.9.0" contain "/" which broke the download filename path construction, causing the file write to target a non-existent subdirectory. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
4c09ed909b
commit
b3c1a3b415
@ -294,7 +294,8 @@ class ReleaseCacheBuilder:
|
|||||||
|
|
||||||
# Download XPI
|
# Download XPI
|
||||||
owner, name = repo.split("/")
|
owner, name = repo.split("/")
|
||||||
filename = f"{owner}#{name}+{tag}@{xpi_id}.xpi"
|
safe_tag = tag.replace("/", "_")
|
||||||
|
filename = f"{owner}#{name}+{safe_tag}@{xpi_id}.xpi"
|
||||||
xpi_path = self.downloader.download(xpi_url, filename)
|
xpi_path = self.downloader.download(xpi_url, filename)
|
||||||
|
|
||||||
if not xpi_path:
|
if not xpi_path:
|
||||||
|
|||||||
@ -190,8 +190,9 @@ class AddonScraper:
|
|||||||
release.releaseDate = xpi_asset.updated_at
|
release.releaseDate = xpi_asset.updated_at
|
||||||
|
|
||||||
# Download and parse XPI
|
# Download and parse XPI
|
||||||
|
safe_tag = release.tagName.replace("/", "_")
|
||||||
xpi_filename = (
|
xpi_filename = (
|
||||||
f"{plugin.owner}#{plugin.repository}+{release.tagName}@{xpi_asset.id}.xpi"
|
f"{plugin.owner}#{plugin.repository}+{safe_tag}@{xpi_asset.id}.xpi"
|
||||||
)
|
)
|
||||||
|
|
||||||
# Determine priority sources based on Zotero version
|
# Determine priority sources based on Zotero version
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user