Open B1Dobbs opened 3 years ago
That's actually the described way, changing this would break existing setups. I'd suggest to have, in your code-workspace:
"favorites.storageFilePath":"../../.favorites.json"
then - according to the docs - it should work (untested)
Hm, I don't think it's understood what I mentioned in the issue. My workspace is saved a couple folders up whereas the folder 'classic' is in the same folder as 'pro'. They are separate projects I work on in the same workspace.
So instead of favorites.json being stored relative to the workspace as it should be based on the note in settings, it is stored in the first project folder in my workspace. Why would the note say 'Storage file path relative to workspace' if it's really relative to the first folder in the workspace?
Readme has:
favorites.useWorkspace
: number - default is 0 index of workspace to use as root when composing storage file path
So according to the docs it seems to be it always uses the first entry (zero based), while you want the "root" or one above, so use the appropriate one. A FR to have it relative to "real project root" with a value of -1 or similar sounds totally reasonable, but that would be @kdcro101's thing to adjust/implement.
Describe the bug When using either the global .favorites.json or the multi-set feature for different projects / workspaces, the files for this extension are stored in first folder in the workspace rather than relative to the workspace.
To Reproduce Steps to reproduce the behavior:
Expected behavior .favorites.json should have been stored and referenced relative to the workspace file ending in 'code-workspace'.
Screenshots Favorites Settings Result
System info (please complete the following information):
Additional info Notice that .favorites.json is under the folder labeled 'classic'. If I were to remove that folder from the workspace, my .favorites.json stored there would be inaccessible and then any new ones would be stored in the new top folder.
My .code-workspace file is located two folders up from the 'classic' folder and that's where I expected the favorite config files to be stored. With the favorites json files stored in the top folder, it now shows up on source control for that project which is problematic.