show keyfile gen errors instead of crashing
Some checks are pending
CodeQL / Analyze (push) Waiting to run

This commit is contained in:
Evan Su 2025-04-18 15:03:26 -04:00
parent 89d461ce9c
commit 3403cd68a8

View file

@ -595,6 +595,9 @@ func draw() {
fout, err := os.Create(file)
if err != nil {
mainStatus = "Failed to create keyfile"
mainStatusColor = RED
giu.Update()
return
}
data := make([]byte, 32)
@ -611,6 +614,8 @@ func draw() {
} else {
mainStatus = "Ready"
mainStatusColor = WHITE
giu.Update()
return
}
}),
giu.Tooltip("Generate a cryptographically secure keyfile"),