mirror of
https://github.com/VSCodium/vscodium.git
synced 2026-04-23 19:40:14 +10:00
refactor: patches (#2797)
This commit is contained in:
22
patches/linux/00-env-improve-xdg-path.patch
Normal file
22
patches/linux/00-env-improve-xdg-path.patch
Normal file
@@ -0,0 +1,22 @@
|
||||
diff --git a/extensions/git/src/ipc/ipcServer.ts b/extensions/git/src/ipc/ipcServer.ts
|
||||
index a7142fe..526ca17 100644
|
||||
--- a/extensions/git/src/ipc/ipcServer.ts
|
||||
+++ b/extensions/git/src/ipc/ipcServer.ts
|
||||
@@ -20,3 +20,7 @@ function getIPCHandlePath(id: string): string {
|
||||
if (process.platform !== 'darwin' && process.env['XDG_RUNTIME_DIR']) {
|
||||
- return path.join(process.env['XDG_RUNTIME_DIR'] as string, `vscode-git-${id}.sock`);
|
||||
+ if (!!process.env.FLATPAK_ID) {
|
||||
+ return path.join(process.env['XDG_RUNTIME_DIR'] as string, 'app', process.env.FLATPAK_ID, `vscode-git-${id}.sock`);
|
||||
+ } else {
|
||||
+ return path.join(process.env['XDG_RUNTIME_DIR'] as string, `vscode-git-${id}.sock`);
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/vs/base/parts/ipc/node/ipc.net.ts b/src/vs/base/parts/ipc/node/ipc.net.ts
|
||||
index e58f678..add8048 100644
|
||||
--- a/src/vs/base/parts/ipc/node/ipc.net.ts
|
||||
+++ b/src/vs/base/parts/ipc/node/ipc.net.ts
|
||||
@@ -839,3 +839,3 @@ function unmask(buffer: VSBuffer, mask: number): void {
|
||||
// Related to https://github.com/microsoft/vscode/issues/30624
|
||||
-export const XDG_RUNTIME_DIR = process.env['XDG_RUNTIME_DIR'];
|
||||
+export const XDG_RUNTIME_DIR = !!process.env.FLATPAK_ID ? join(process.env['XDG_RUNTIME_DIR'] as string, 'app', process.env.FLATPAK_ID) : process.env['XDG_RUNTIME_DIR'];
|
||||
|
||||
Reference in New Issue
Block a user