From 40aed75986e3d6ca31980c30def11ad9dfe2a2f6 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Mon, 14 Oct 2019 15:14:34 +0200 Subject: [PATCH] fix #56651 --- src/main.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main.js b/src/main.js index afe479d6174..8db96e5272b 100644 --- a/src/main.js +++ b/src/main.js @@ -32,6 +32,14 @@ const args = parseCLIArgs(); const userDataPath = getUserDataPath(args); app.setPath('userData', userDataPath); +// Set logs path before app 'ready' event if running portable +// to ensure that no 'logs' folder is created on disk at a +// location outside of the portable directory +// (https://github.com/microsoft/vscode/issues/56651) +if (portable.isPortable) { + app.setAppLogsPath(path.join(userDataPath, 'logs')); +} + // Update cwd based on environment and platform setCurrentWorkingDirectory(); -- GitLab