mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-16 15:16:44 +00:00
Use lenient version parser to properly parse version provided by Mac
This commit is contained in:
committed by
Jakub Cuth
parent
72c01046e3
commit
e055acb8eb
@ -20,6 +20,7 @@ package useragent
|
|||||||
import (
|
import (
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"runtime"
|
"runtime"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"github.com/Masterminds/semver/v3"
|
"github.com/Masterminds/semver/v3"
|
||||||
)
|
)
|
||||||
@ -38,11 +39,11 @@ func getMacVersion() string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
return string(out)
|
return strings.TrimSpace(string(out))
|
||||||
}
|
}
|
||||||
|
|
||||||
func isVersionCatalinaOrNewer(version string) bool {
|
func isVersionCatalinaOrNewer(version string) bool {
|
||||||
v, err := semver.StrictNewVersion(version)
|
v, err := semver.NewVersion(version)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|||||||
@ -34,6 +34,7 @@ func TestIsVersionCatalinaOrNewer(t *testing.T) {
|
|||||||
{"10.15.0"}: true,
|
{"10.15.0"}: true,
|
||||||
{"10.16.0"}: true,
|
{"10.16.0"}: true,
|
||||||
{"11.0.0"}: true,
|
{"11.0.0"}: true,
|
||||||
|
{"11.1"}: true,
|
||||||
}
|
}
|
||||||
|
|
||||||
for args, exp := range testData {
|
for args, exp := range testData {
|
||||||
|
|||||||
@ -14,3 +14,10 @@ Changelog [format](http://keepachangelog.com/en/1.0.0/)
|
|||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
* GODT-1011 Stable integration test deleting many messages using UID EXPUNGE.
|
* GODT-1011 Stable integration test deleting many messages using UID EXPUNGE.
|
||||||
|
* GODT-787 GODT-978 Fix IE and Bridge importing to sent not showing up in inbox (setting up flags properly).
|
||||||
|
* GODT-1006 Use correct macOS keychain name.
|
||||||
|
* GODT-1009 Set ContentID if present and not explicitly attachment.
|
||||||
|
* GODT-900 Remove \Deleted flag after re-importing the message (do not delete messages by moving to local folder and back).
|
||||||
|
* GODT-908 Do not unpause event loop if other mailbox is still fetching.
|
||||||
|
* Check deprecated status code first to better determine API error.
|
||||||
|
* GODT-1015 Use lenient version parser to properly parse version provided by Mac.
|
||||||
|
|||||||
Reference in New Issue
Block a user