From 12e0b4daa4485c2dd623b5a58a85baf970b5b413 Mon Sep 17 00:00:00 2001 From: Totoo Date: Thu, 7 Nov 2024 10:05:13 +0100 Subject: [PATCH] Fix path (#75) * Fix path Maybe fix for #65 * Ensure dir * Update Controller.tsx --- src/components/Controller/Controller.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Controller/Controller.tsx b/src/components/Controller/Controller.tsx index 091d5ce..06e7529 100644 --- a/src/components/Controller/Controller.tsx +++ b/src/components/Controller/Controller.tsx @@ -223,11 +223,11 @@ const Controller = () => { ) => { const fileList = event.target.files; if (!fileList) return; - let file = fileList[0]; let reader = new FileReader(); reader.onloadend = async () => { + await write(`mkdir /FIRMWARE`, false, true); const arrayBuffer = reader.result; if (arrayBuffer instanceof ArrayBuffer) { let bytes = new Uint8Array(arrayBuffer); @@ -641,7 +641,7 @@ const Controller = () => {