diff --git a/src/paths.js b/src/paths.js index 8411ed4dac2..1fa7c625ee1 100644 --- a/src/paths.js +++ b/src/paths.js @@ -8,18 +8,17 @@ var os = require('os'); var pkg = require('../package.json'); function getAppDataPath(platform) { - const userPath = process.env['vscode_config_prefix']; switch (platform) { - case 'win32': return userPath || process.env['APPDATA'] || path.join(process.env['USERPROFILE'], 'AppData', 'Roaming'); - case 'darwin': return userPath || path.join(os.homedir(), 'Library', 'Application Support'); - case 'linux': return userPath || process.env['XDG_CONFIG_HOME'] || path.join(os.homedir(), '.config'); + case 'win32': return process.env['VSCODE_APPDATA'] || process.env['APPDATA'] || path.join(process.env['USERPROFILE'], 'AppData', 'Roaming'); + case 'darwin': return process.env['VSCODE_APPDATA'] || path.join(os.homedir(), 'Library', 'Application Support'); + case 'linux': return process.env['VSCODE_APPDATA'] || process.env['XDG_CONFIG_HOME'] || path.join(os.homedir(), '.config'); default: throw new Error('Platform not supported'); } } function getDefaultUserDataPath(platform) { - return path.join(getAppDataPath(platform), pkg.name); } + exports.getAppDataPath = getAppDataPath; -exports.getDefaultUserDataPath = getDefaultUserDataPath; +exports.getDefaultUserDataPath = getDefaultUserDataPath; \ No newline at end of file