From 152a5578fce30dff0c183db81b52fc8332947a52 Mon Sep 17 00:00:00 2001 From: KernelDeimos Date: Mon, 16 Jun 2025 17:23:40 -0400 Subject: [PATCH] fix: issue using ll_write outside of hl_write Using LLOWrite outside of HLWrite, which is useful inside a Puter extension when a simple write operation is being invoked by the backend, required passing a thumbnail. However, sometimes this is not necessary. This commit makes it possible run an LLOWrite operation without passing a thumbnail stream. --- src/backend/src/filesystem/ll_operations/ll_write.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/backend/src/filesystem/ll_operations/ll_write.js b/src/backend/src/filesystem/ll_operations/ll_write.js index 15fd24968..bfeaf96fc 100644 --- a/src/backend/src/filesystem/ll_operations/ll_write.js +++ b/src/backend/src/filesystem/ll_operations/ll_write.js @@ -189,8 +189,10 @@ class LLOWrite extends LLWriteBase { } }); - fsentry_tmp.thumbnail = await fsentry_tmp.thumbnail_promise; - delete fsentry_tmp.thumbnail_promise; + if ( fsentry_tmp?.thumbnail_promise ) { + fsentry_tmp.thumbnail = await fsentry_tmp.thumbnail_promise; + delete fsentry_tmp.thumbnail_promise; + } const ts = Math.round(Date.now() / 1000); const raw_fsentry_delta = {