mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-06-08 05:06:33 +00:00
Fixed endless loop in the sketch service.
Signed-off-by: Akos Kitta <kittaakos@typefox.io>
This commit is contained in:
parent
f9a98d708e
commit
d92fc25769
@ -52,7 +52,8 @@ export class SketchesServiceImpl implements SketchesService {
|
|||||||
const uris: string[] = [];
|
const uris: string[] = [];
|
||||||
const fsPath = FileUri.fsPath(uri);
|
const fsPath = FileUri.fsPath(uri);
|
||||||
const stats = fs.lstatSync(fsPath);
|
const stats = fs.lstatSync(fsPath);
|
||||||
if (stats.isDirectory && await this.isSketchFolder(uri)) {
|
if (stats.isDirectory) {
|
||||||
|
if (await this.isSketchFolder(uri)) {
|
||||||
const fileNames = fs.readdirSync(fsPath);
|
const fileNames = fs.readdirSync(fsPath);
|
||||||
for (const fileName of fileNames) {
|
for (const fileName of fileNames) {
|
||||||
const filePath = path.join(fsPath, fileName);
|
const filePath = path.join(fsPath, fileName);
|
||||||
@ -62,6 +63,7 @@ export class SketchesServiceImpl implements SketchesService {
|
|||||||
uris.push(FileUri.create(filePath).toString())
|
uris.push(FileUri.create(filePath).toString())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return uris;
|
return uris;
|
||||||
}
|
}
|
||||||
const sketchDir = path.dirname(fsPath);
|
const sketchDir = path.dirname(fsPath);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user