fix: upload "overwrite" option not visible when it should
Massimo Melina committed
Sep 8, 2025 at 16:52 UTC
b5a797b6f6cf88e2e6e77591dd6ffa42252f41d8
1 file changed
+1
-1
src/api.get_file_list.ts
+1
-1
@@ -52,7 +52,7 @@ export const get_file_list: ApiHandler = async ({ uri='/', offset, limit, c, onl
52
const can_delete_children = admin || hasPermission(fakeChild, 'can_delete', ctx)
53
const can_archive = admin || hasPermission(node, 'can_archive', ctx)
54
const can_comment = can_upload && areCommentsEnabled()
55
- const can_overwrite = can_upload && (can_delete || !dontOverwriteUploading.get())
55
+ const can_overwrite = can_upload && (can_delete_children || !dontOverwriteUploading.get())
56
const comment = node.comment ?? await getCommentFor(node.source)
57
const props = { can_archive, can_upload, can_delete, can_delete_children, can_overwrite, can_comment, comment, accept: node.accept, icon: getNodeIcon(node) }
58
ctx.state.browsing = uri.replace(/\/{2,}/g, '/')