mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-10-18 15:48:31 +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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user