fix: (beta) upload overwrite was not working
Massimo Melina committed
Feb 25, 2024 at 17:06 UTC
1dfcf3c90d4cc8691b6425c7fb2a781b7c850d31
1 file changed
+1
-1
src/upload.ts
+1
-1
@@ -122,7 +122,7 @@ export function uploadWriter(base: VfsNode, path: string, ctx: Koa.Context) {
122
123
async function overwriteAnyway() {
124
if (ctx.query.overwrite === undefined // legacy pre-0.52
125
- || ctx.query.existing === 'overwrite') return
125
+ && ctx.query.existing !== 'overwrite') return
126
const n = await getNodeByName(path, base)
127
return n && hasPermission(n, 'can_delete', ctx)
128
}