mirror of
https://github.com/Picocrypt/Picocrypt.git
synced 2025-05-12 13:48:31 +02:00
show keyfile gen errors instead of crashing
Some checks are pending
CodeQL / Analyze (push) Waiting to run
Some checks are pending
CodeQL / Analyze (push) Waiting to run
This commit is contained in:
parent
89d461ce9c
commit
3403cd68a8
1 changed files with 5 additions and 0 deletions
|
@ -595,6 +595,9 @@ func draw() {
|
||||||
|
|
||||||
fout, err := os.Create(file)
|
fout, err := os.Create(file)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
mainStatus = "Failed to create keyfile"
|
||||||
|
mainStatusColor = RED
|
||||||
|
giu.Update()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
data := make([]byte, 32)
|
data := make([]byte, 32)
|
||||||
|
@ -611,6 +614,8 @@ func draw() {
|
||||||
} else {
|
} else {
|
||||||
mainStatus = "Ready"
|
mainStatus = "Ready"
|
||||||
mainStatusColor = WHITE
|
mainStatusColor = WHITE
|
||||||
|
giu.Update()
|
||||||
|
return
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
giu.Tooltip("Generate a cryptographically secure keyfile"),
|
giu.Tooltip("Generate a cryptographically secure keyfile"),
|
||||||
|
|
Loading…
Add table
Reference in a new issue