fix: default the path picker to a folder the user can write to (#12448)

This commit is contained in:
Raunak Burrows
2026-11-15 14:17:21 +00:00
committed by GitHub
parent bbb48f5a61
commit aef5332f95
+3 -1
View File
@@ -525,7 +525,9 @@
setDirty()
meta.ownerKind = v
if (v === 'folder') {
meta.owner = folders?.[0]?.name ?? ''
// Prefer a folder the user can write to: a read-only one cannot
// be picked in the list and saving in it is refused.
meta.owner = (folders.find((f) => f.write) ?? folders[0])?.name ?? ''
} else {
// 'group' is unreachable here (Select only offers user/folder)
// but validateName still accepts it for forward-compat.