From 0f97653b4ce5f8c904537f7444e1ad055935cfc3 Mon Sep 17 00:00:00 2001 From: Neal Shah <30693865+ProgrammerIn-wonderland@users.noreply.github.com> Date: Fri, 13 Feb 2026 15:38:56 -0800 Subject: [PATCH] fix stat options when stat(path, options) (#2492) --- src/puter-js/src/modules/FileSystem/operations/stat.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/puter-js/src/modules/FileSystem/operations/stat.js b/src/puter-js/src/modules/FileSystem/operations/stat.js index 5e5ac686c..2d6af99c6 100644 --- a/src/puter-js/src/modules/FileSystem/operations/stat.js +++ b/src/puter-js/src/modules/FileSystem/operations/stat.js @@ -19,7 +19,7 @@ const stat = async function (...args) { // Otherwise, we assume separate arguments are provided options = { path: args[0], - options: typeof args[1] === 'object' ? args[1] : {}, + ...(typeof args[1] === 'object' ? args[1] : {}), success: typeof args[1] === 'object' ? args[2] : args[1], error: typeof args[1] === 'object' ? args[3] : args[2], // Add more if needed...