mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-07-08 03:46:33 +00:00
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 <a.kitta@arduino.cc>
This commit is contained in:
parent
103acc4b7e
commit
cc2d557706
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user