mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-07-13 06:16:33 +00:00
Can edit user-storage files. E.g.: keymaps.json
.
Signed-off-by: Akos Kitta <kittaakos@typefox.io>
This commit is contained in:
parent
f106c97f1e
commit
98671225ac
@ -135,6 +135,9 @@ export class SketchesServiceClientImpl implements FrontendApplicationContributio
|
|||||||
*/
|
*/
|
||||||
isReadOnly(uri: URI | monaco.Uri | string): boolean {
|
isReadOnly(uri: URI | monaco.Uri | string): boolean {
|
||||||
const toCheck = uri instanceof URI ? uri : new URI(uri);
|
const toCheck = uri instanceof URI ? uri : new URI(uri);
|
||||||
|
if (toCheck.scheme === 'user-storage') {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
const readOnly = !this.workspaceService.tryGetRoots().some(({ resource }) => resource.isEqualOrParent(toCheck));
|
const readOnly = !this.workspaceService.tryGetRoots().some(({ resource }) => resource.isEqualOrParent(toCheck));
|
||||||
return readOnly;
|
return readOnly;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user