fix: plugins: for vfs_path configs that accept files, user could not paste a path to a file

Massimo Melina committed Mar 9, 2026 at 10:55 UTC a79c2692b5cdb335c658535c76fa741a9e05ff27
2 files changed +3 -2
admin/src/InstalledPlugins.ts
+1 -1
@@ -41,7 +41,7 @@ export default function InstalledPlugins({ updates }: { updates?: true }) {
41 async onClick() {
42 await apiCall('set_config', { values: { [CFG.suspend_plugins]: !pause } })
43 if (!pause) return
44 - await wait(3000)
44 + await wait(2000)
45 setSortAgain(Date.now())
46 }
47 })
admin/src/VfsPathField.ts
+2 -1
@@ -37,10 +37,11 @@ export default function VfsPathField({ value='', onChange, helperText, setApi, a
37 helperText,
38 onChange(event) {
39 const v = event.target.value
40 - if (v.endsWith('/') || !v)
40 + if (files || !v || v.endsWith('/'))
41 onChange(v, { was: value, event })
42 },
43 onBlur(event) {
44 + // if the user specified a folder without the final slash, try to enforce it
45 const v = enforceFinal('/', event.target.value)
46 if (options.includes(v))
47 onChange(v, { was: value, event })