From a5dee81e4525f169849fde08b9c26e27cbda2916 Mon Sep 17 00:00:00 2001 From: Jonathan White Date: Sat, 29 Oct 2022 12:29:50 -0400 Subject: [PATCH] Browser: second fix for linked socket path * Fix #8702 --- src/browser/BrowserShared.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/browser/BrowserShared.cpp b/src/browser/BrowserShared.cpp index f59782740..6fd2cf7ee 100644 --- a/src/browser/BrowserShared.cpp +++ b/src/browser/BrowserShared.cpp @@ -38,14 +38,15 @@ namespace BrowserShared // Put the socket in a dedicated directory. // This directory will be easily mountable by sandbox containers. - QString subPath = path + "/app/org.keepassxc.KeePassXC/"; + QString subPath = path + "/app/org.keepassxc.KeePassXC"; QDir().mkpath(subPath); QString socketPath = subPath + serverName; #ifndef KEEPASSXC_DIST_FLATPAK - QFile::remove(socketPath); // Create a symlink at the legacy location for backwards compatibility. - QFile::link(socketPath, path + serverName); + const auto origSocketPath = path + serverName; + QFile::remove(origSocketPath); + QFile::link(socketPath, origSocketPath); #endif return socketPath;