Skip to content

Commit

Permalink
fix: relaxed condition to check if resource exists
Browse files Browse the repository at this point in the history
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 <a.kitta@arduino.cc>
  • Loading branch information
Akos Kitta authored and kittaakos committed Nov 10, 2022
1 parent 103acc4 commit cc2d557
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arduino-ide-extension/src/node/sketches-service-impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,7 @@ export class SketchesServiceImpl

private async exists(pathLike: string): Promise<boolean> {
try {
await fs.access(pathLike, constants.R_OK | constants.W_OK);
await fs.access(pathLike, constants.R_OK);
return true;
} catch {
return false;
Expand Down

0 comments on commit cc2d557

Please sign in to comment.