From d738fdff578ca0e186773d3ee3ad2260d53f0483 Mon Sep 17 00:00:00 2001 From: James Houlahan Date: Wed, 26 Oct 2022 13:18:48 +0200 Subject: [PATCH] GODT-1974: Store everything in v3 path --- internal/constants/constants.go | 29 +++++++++++-------- .../bridge-gui/bridge-gui/qml/Bridge_test.qml | 2 +- .../bridgepp/bridgepp/BridgeUtils.cpp | 2 +- 3 files changed, 19 insertions(+), 14 deletions(-) diff --git a/internal/constants/constants.go b/internal/constants/constants.go index 9eba88f4..6798da4c 100644 --- a/internal/constants/constants.go +++ b/internal/constants/constants.go @@ -30,20 +30,11 @@ const VendorName = "protonmail" //nolint:gochecknoglobals var ( - // Full app name (to show to the user). + // FullAppName is the full app name (to show to the user). FullAppName = "" - // ConfigName determines the name of the location where bridge stores config files. - ConfigName = "bridge" - - // UpdateName is the name of the product appearing in the update URL. - UpdateName = "bridge" - - // KeyChainName is the name of the entry in the OS keychain. - KeyChainName = "bridge" - // Version of the build. - Version = "2.4.1+git" + Version = "" // Revision is current hash of the build. Revision = "" @@ -56,6 +47,20 @@ var ( // DSNSentry client keys to be able to report crashes to Sentry. DSNSentry = "" +) + +const ( + // AppName is the name of the product appearing in the request headers. + AppName = "bridge" + + // UpdateName is the name of the product appearing in the update URL. + UpdateName = "bridge" + + // ConfigName determines the name of the location where bridge stores config/cache files. + ConfigName = "bridge-v3" + + // KeyChainName is the name of the entry in the OS keychain. + KeyChainName = "bridge-v3" // Host is the hostname of the bridge server. Host = "127.0.0.1" @@ -63,7 +68,7 @@ var ( // AppVersion returns the full rendered version of the app (to be used in request headers). func AppVersion(version string) string { - return getAPIOS() + cases.Title(language.Und).String(ConfigName) + "_" + version + return getAPIOS() + cases.Title(language.Und).String(AppName) + "_" + version } func getAPIOS() string { diff --git a/internal/frontend/bridge-gui/bridge-gui/qml/Bridge_test.qml b/internal/frontend/bridge-gui/bridge-gui/qml/Bridge_test.qml index 5668324d..1a9fe72a 100644 --- a/internal/frontend/bridge-gui/bridge-gui/qml/Bridge_test.qml +++ b/internal/frontend/bridge-gui/bridge-gui/qml/Bridge_test.qml @@ -766,7 +766,7 @@ Window { property bool isDiskCacheEnabled: true - // Qt.resolvedUrl("file:///C:/Users/user/AppData/Roaming/protonmail/bridge/cache/c11/messages") + // Qt.resolvedUrl("file:///C:/Users/user/AppData/Roaming/protonmail/bridge-v3/cache/c11/messages") property url diskCachePath: StandardPaths.standardLocations(StandardPaths.HomeLocation)[0] signal cacheUnavailable() signal cacheCantMove() diff --git a/internal/frontend/bridge-gui/bridgepp/bridgepp/BridgeUtils.cpp b/internal/frontend/bridge-gui/bridgepp/bridgepp/BridgeUtils.cpp index bb31ae1a..91c49c77 100644 --- a/internal/frontend/bridge-gui/bridgepp/bridgepp/BridgeUtils.cpp +++ b/internal/frontend/bridge-gui/bridgepp/bridgepp/BridgeUtils.cpp @@ -28,7 +28,7 @@ namespace bridgepp namespace { -QString const configFolder = "protonmail/bridge"; +QString const configFolder = "protonmail/bridge-v3"; QMutex rngMutex; ///< the mutex to use when accessing the rng. QStringList const firstNames {