MartinBalin commented on code in PR #24:
URL: https://github.com/apache/netbeans-vscode/pull/24#discussion_r4193372038
##########
vscode/src/nbcode.ts:
##########
@@ -97,30 +98,67 @@ if (typeof process === 'object' && typeof process.argv0
==='string' && process.a
let args = process.argv.slice(2);
let json = JSON.parse("" + fs.readFileSync(path.join(extension,
'package.json')));
let storage;
-
- if (!env.nbcode_userdir || env.nbcode_userdir == 'global') {
- storage = path.join(os.platform() === 'darwin' ?
- path.join(os.homedir(), 'Library', 'Application Support') :
- path.join(os.homedir(), '.config'),
- 'Code', 'User', 'globalStorage', json.publisher + '.' +
json.name);
+ let datadir;
+ if (!env.nbcode_userdir) {
+ datadir= path.join(process.cwd(), "out", "userdir");
+ storage = path.join(datadir, json.publisher + '.' + json.name);
+ } else if (env.nbcode_userdir == 'global') {
Review Comment:
`nbcode_userdir=global` selects the wrong data directory.
On macOS, this passes `~/Library/Application Support `as VS Code’s
`--user-data-dir`, omitting Code. On Linux, it passes
`~/.config/Code/User/globalStorage`, which is already inside the profile. The
extension then resolves its global storage relative to this incorrect root, so
existing NBLS state is no longer reused and new profile files are written in
the wrong location. Keep VS Code’s profile directory separate from the NBLS
storage directory.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists