mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-11-08 01:48:32 +00:00
Use latest version of fs-extra due to stack overflow bugs in earlier versions
This commit is contained in:
@@ -21,7 +21,7 @@ export class SketchesServiceImpl implements SketchesService {
|
||||
const { sketchDirUri } = (await this.configService.getConfiguration());
|
||||
fsPath = FileUri.fsPath(sketchDirUri);
|
||||
if (!fs.existsSync(fsPath)) {
|
||||
fs.mkdirpSync(fsPath);
|
||||
await fs.mkdirp(fsPath);
|
||||
}
|
||||
} else {
|
||||
fsPath = FileUri.fsPath(uri);
|
||||
@@ -96,8 +96,8 @@ export class SketchesServiceImpl implements SketchesService {
|
||||
|
||||
const sketchDir = path.join(parent, sketchName)
|
||||
const sketchFile = path.join(sketchDir, `${sketchName}.ino`);
|
||||
fs.mkdirpSync(sketchDir);
|
||||
fs.writeFileSync(sketchFile, `
|
||||
await fs.mkdirp(sketchDir);
|
||||
await fs.writeFile(sketchFile, `
|
||||
void setup() {
|
||||
// put your setup code here, to run once:
|
||||
|
||||
@@ -140,4 +140,4 @@ void loop() {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user