From cc2d557706dddf2f0acade19644bdf33eaf9d52a Mon Sep 17 00:00:00 2001 From: Akos Kitta Date: Thu, 3 Nov 2022 16:43:34 +0100 Subject: [PATCH] fix: relaxed condition to check if resource exists The original (`fs-extra`-based) implementation did not check if the file is writable either. Resources are not writable in mounted AppImages. Closes #1586 Signed-off-by: Akos Kitta --- arduino-ide-extension/src/node/sketches-service-impl.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arduino-ide-extension/src/node/sketches-service-impl.ts b/arduino-ide-extension/src/node/sketches-service-impl.ts index 1d1d61221..fbfaca7a0 100644 --- a/arduino-ide-extension/src/node/sketches-service-impl.ts +++ b/arduino-ide-extension/src/node/sketches-service-impl.ts @@ -660,7 +660,7 @@ export class SketchesServiceImpl private async exists(pathLike: string): Promise { try { - await fs.access(pathLike, constants.R_OK | constants.W_OK); + await fs.access(pathLike, constants.R_OK); return true; } catch { return false;