plugins: installation folder now reflects the name in the list
Massimo Melina committed
Oct 7, 2024 at 23:53 UTC
d6cab77b424375159d889fe2f27a9c4442efef18
1 file changed
+1
-1
src/github.ts
+1
-1
@@ -71,7 +71,7 @@ export async function downloadPlugin(repo: Repo, { branch='', overwrite=false }=
71
throw new ApiError(HTTP_BAD_REQUEST, "bad repo")
72
const folder = overwrite && pl?.id // use existing folder
73
|| (getFolder2repo().hasOwnProperty(short) ? repo.replace('/','-') // longer form only if another plugin is using short form, to avoid overwriting
74
- : short)
74
+ : short.replace(/^hfs-/, ''))
75
const GITHUB_ZIP_ROOT = short + '-' + branch // GitHub puts everything within this folder
76
return await go(`https://github.com/${repo}/archive/refs/heads/${branch}.zip`, folder, GITHUB_ZIP_ROOT + '/' + DIST_ROOT)
77