kdcro101 / vscode-favorites

Add files and directories to workspace favorites. You can create groups (and subgroups) of favorite items with files and folders. Time saver for complex projects.
MIT License
49 stars 13 forks source link

FR: add support for saving to workspace private data #53

Open GitMensch opened 3 years ago

GitMensch commented 3 years ago

I've tried to use this extension in a multi-folder workspace which is nearly complete read-only and get a non-working extension with the error message EPERM in the first folder:

[2020-12-04 16:00:55.086] [renderer5] [error] EPERM: operation not permitted, open 'x:\PROJECT\firstfolder\.favorites.json': Error: EPERM: operation not permitted, open 'x:\PROJECT\firstfolde\.favorites.json'

This issue is about (at least optionally, if not default) be able to switch to workspace-private data as storage, see https://code.visualstudio.com/api/references/vscode-api#ExtensionContext.storageUri for details. This way the data is still stored per workspace but found in a user-writable place (instead of one place within the workspace which is shared for all users of the workspace). As I've seen a reference in the code I thought this is the default or possible to use, but that doesn't seem to be possible yet.