You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Installer: a download URL with a query string names the downloaded file with its query, which fails on Windows and keeps an archive from being extracted #2206
DownloadTask.extractFileName takes the name of the downloaded file from everything after the last / of the download URL, its query and fragment included. For a URL such as https://example.com/download/v1.0/server.jar?access_token=…, the file is named server.jar?access_token=…:
On Windows? can't be in a file name, so the download fails.
On macOS and Linux the file gets that name. It keeps the query, a token included, in its name, and an archive such as server.zip?… isn't recognized by its extension, so it isn't extracted.
Signed or tokenized download URLs, and URLs such as GitLab's …/raw?ref=main or GitHub's …?raw=true, have a query.
Found by the Windows job of #2195, whose test downloads such a URL.
Expected
The file is named after the URL's path, without its query or fragment: server.jar.
Test
A download of …/server.jar?access_token=… installs server.jar, on every OS.
Activity
fix: a downloaded file is named after the path of its URL, without th…
fix: a downloaded file is named after the path of its URL, without th…
fix: a downloaded file is named after the path of its URL, without th…