mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-26 03:29:00 +01:00
UNC follow up changes (#181946)
* settings include update * more cleanup
This commit is contained in:
@@ -22,6 +22,7 @@ const bootstrap = require('./bootstrap');
|
||||
const bootstrapNode = require('./bootstrap-node');
|
||||
const { getUserDataPath } = require('./vs/platform/environment/node/userDataPath');
|
||||
const { stripComments } = require('./vs/base/common/stripComments');
|
||||
const { getUNCHost, addUNCHostToAllowlist } = require('./vs/base/node/unc');
|
||||
/** @type {Partial<IProductConfiguration>} */
|
||||
const product = require('../product.json');
|
||||
const { app, protocol, crashReporter, Menu } = require('electron');
|
||||
@@ -35,6 +36,12 @@ bootstrap.enableASARSupport();
|
||||
// Set userData path before app 'ready' event
|
||||
const args = parseCLIArgs();
|
||||
const userDataPath = getUserDataPath(args, product.nameShort ?? 'code-oss-dev');
|
||||
if (process.platform === 'win32') {
|
||||
const userDataUNCHost = getUNCHost(userDataPath);
|
||||
if (userDataUNCHost) {
|
||||
addUNCHostToAllowlist(userDataUNCHost); // enables to use UNC paths in userDataPath
|
||||
}
|
||||
}
|
||||
app.setPath('userData', userDataPath);
|
||||
|
||||
// Resolve code cache path
|
||||
|
||||
Reference in New Issue
Block a user