Can edit user-storage files. E.g.: keymaps.json.

Signed-off-by: Akos Kitta <kittaakos@typefox.io>
This commit is contained in:
Akos Kitta 2021-03-29 16:05:21 +02:00 committed by Akos Kitta
parent f106c97f1e
commit 98671225ac

View File

@ -135,6 +135,9 @@ export class SketchesServiceClientImpl implements FrontendApplicationContributio
*/
isReadOnly(uri: URI | monaco.Uri | string): boolean {
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));
return readOnly;
}