Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit c3dc7c6

Browse files
Akos Kittakittaakos
Akos Kitta
authored andcommitted
fix: avoid ENOTDIR when opening second instance.
If the resource is a file, do not try to `readdir`, but return undefined Closes #1590 Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
1 parent 7d6a2d5 commit c3dc7c6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎arduino-ide-extension/src/electron-main/theia/electron-main-application.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,8 @@ export class ElectronMainApplication extends TheiaElectronMainApplication {
181181
if (!stats) {
182182
return undefined;
183183
}
184-
if (stats.isFile()&&path.endsWith('.ino')) {
185-
return path;
184+
if (stats.isFile()) {
185+
return path.endsWith('.ino') ? path : undefined;
186186
}
187187
try {
188188
const entries = await fs.readdir(path, { withFileTypes: true });

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /