diff --git a/preload.js b/preload.js index 8c7e695..ddcb8aa 100644 --- a/preload.js +++ b/preload.js @@ -60,7 +60,7 @@ const Serial = { return board.fs_save(content || ' ', filename, dataConsumer) }, uploadFile: async (src, dest, dataConsumer) => { - return board.fs_put(src, dest, dataConsumer) + return board.fs_put(src, dest.replaceAll(path.win32.sep, path.posix.sep), dataConsumer) }, downloadFile: async (src, dest) => { let contents = await Serial.loadFile(src) diff --git a/ui/arduino/store.js b/ui/arduino/store.js index 3bcac48..2c93a7e 100644 --- a/ui/arduino/store.js +++ b/ui/arduino/store.js @@ -1536,7 +1536,7 @@ async function uploadFolder(srcPath, destPath, dataConsumer) { disk.getFullPath(srcPath, relativePath, ''), serial.getFullPath(destPath, relativePath, ''), (progress) => { - dataConsumer(progress, relativePath.slice(1)) + dataConsumer(progress, relativePath) } ) }