We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Failed to execute 'getWriter' on 'WritableStream': Cannot create writer when WritableStream is locked
1 parent d337f26 commit b0aa56dCopy full SHA for b0aa56d
examples/uartUploadZIP.html
@@ -86,7 +86,8 @@
86
// If the path ends with a slash, it's a directory, which we should create if it doesn't exist
87
if (path[path.length-1]=="/") {
88
console.log("Creating directory "+path);
89
- UART.getConnection().write(`\x10if (!require("fs").statSync(${JSON.stringify(path)})) require("fs").mkdir(${JSON.stringify(path)});\n`);
+ return new Promise(resolve =>
90
+ UART.getConnection().write(`\x10if (!require("fs").statSync(${JSON.stringify(path)})) require("fs").mkdir(${JSON.stringify(path)});\n`, resolve));
91
} else {
92
console.log("Can't restore files of length 0, ignoring "+path);
93
}
0 commit comments