From 9c881a02d6984c7424d8340f23c3665c6d4e71e3 Mon Sep 17 00:00:00 2001 From: Michal Horejsek Date: Thu, 10 Dec 2020 09:33:37 +0100 Subject: [PATCH] Fix license path for arch --- pkg/config/config.go | 8 +++++++- unreleased.md | 4 ++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/pkg/config/config.go b/pkg/config/config.go index 66c7dda0..28a93db8 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -206,7 +206,13 @@ func (c *Config) GetLicenseFilePath() string { if c.appName == "importExport" { appName = "import-export" } - return "/usr/share/doc/protonmail/" + appName + "/LICENSE" + // Most Linux distributions. + path := "/usr/share/doc/protonmail/" + appName + "/LICENSE" + if _, err := os.Stat(path); err == nil { + return path + } + // Arch distributions. + return "/usr/share/licenses/protonmail-" + appName + "/LICENSE" case "darwin": //nolint[goconst] path := filepath.Join(filepath.Dir(os.Args[0]), "..", "Resources", "LICENSE") if _, err := os.Stat(path); err == nil { diff --git a/unreleased.md b/unreleased.md index 23b8423c..a1a14b2f 100644 --- a/unreleased.md +++ b/unreleased.md @@ -12,3 +12,7 @@ Changelog [format](http://keepachangelog.com/en/1.0.0/) ### Removed ### Fixed +* GODT-135 Support parameters in SMTP `FROM MAIL` command, such as `BODY=7BIT`, or empty value `FROM MAIL:<>` used by some clients. +* GODT-338 GODT-781 GODT-857 GODT-866 Flaky tests. +* GODT-773 Replace old dates with birthday of RFC822 to not crash Apple Mail. Original is available under `X-Original-Date` header. +* License path on Arch distributions.