forked from amazingfate/loongoffice
Some github release URLs, like https://github.com/hanya/MRI/releases/download/v1.3.5/MRI-1.3.5.oxt get redirected to something like https://release-assets.githubusercontent.com/github-production-release-asset/3265966/eff2c80e-138d-4b06-8139-e433f4672379?... of which, 'eff2c80e-138d-4b06-8139-e433f4672379' is used as ucbhelper::Content's title. That is used to construct local filename in UpdateInstallDialog::Thread::download. Later in PackageRegistryImpl::bindPackage, the extension of the file will be used to detect the mediatype; if failed, operation will abort. Detect this situation, and restore the filename from URL. Change-Id: Ib95189ff35e07fd01c95f87827c6f620ebfe2fe1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188114 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit b729b0bb677bd2b82492b45806ed3ddd91d2234f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188188 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> (cherry picked from commit 59340251fa4c403c0659e0016ff1e606b829c669) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189297 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>