You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2020/10/26 16:13:30 UTC

[GitHub] [netbeans] JaroslavTulach commented on a change in pull request #2494: Where is the NbCode userdir?

JaroslavTulach commented on a change in pull request #2494:
URL: https://github.com/apache/netbeans/pull/2494#discussion_r512085171



##########
File path: java/java.lsp.server/vscode/src/nbcode.ts
##########
@@ -86,7 +88,8 @@ if (typeof process === 'object' && process.argv0 === 'node') {
     }
     let clusters = fs.readdirSync(nbcode).filter(c => c !== 'bin' && c !== 'etc').map(c => path.join(nbcode, c));
     let args = process.argv.slice(2);
-    let globalStorage = path.join(os.homedir(), '.config', 'Code', 'User', 'globalStorage', 'jlahoda.apache-netbeans-java');
+    let json = JSON.parse("" + fs.readFileSync(path.join(extension, 'package.json')));
+    let globalStorage = path.join(os.homedir(), '.config', 'Code', 'User', 'globalStorage', json.publisher + '.' + json.name);

Review comment:
       While at it, let also read the `publisher` and extension `name` from the actual `package.json` file.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists