Fix license path for arch

This commit is contained in:
Michal Horejsek
2020-12-10 09:33:37 +01:00
committed by Jakub Cuth
parent 7b21c2d734
commit 9c881a02d6
2 changed files with 11 additions and 1 deletions

View File

@ -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 {

View File

@ -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.