Skip to content
This repository was archived by the owner on Oct 1, 2024. It is now read-only.

check the directory exist when load examples #573

Merged
merged 1 commit into from
May 28, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/arduino/exampleManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ export class ExampleManager {
private async parseExamplesFromLibrary(rootPath: string, checkCompatibility: boolean, categorizeIncompatible: boolean = false) {
const examples = [];
const inCompatibles = [];
if (!util.directoryExistsSync(rootPath)) {
return [];
}
const libraries = util.readdirSync(rootPath, true);
for (const library of libraries) {
const propertiesFile = path.join(rootPath, library, "library.properties");
Expand Down