aboutsummaryrefslogtreecommitdiffstats
path: root/src/c_init.go
diff options
context:
space:
mode:
authorJoe <rbo@gmx.us>2024-01-31 20:20:20 +0100
committerJoe <rbo@gmx.us>2024-01-31 20:20:20 +0100
commit98bc232593015bb368635da0a3716c61850695a2 (patch)
tree43910c482bdcb24702a75e9daece7432443fe015 /src/c_init.go
parentgood start (diff)
downloadhardflip-98bc232593015bb368635da0a3716c61850695a2.tar.gz
hardflip-98bc232593015bb368635da0a3716c61850695a2.tar.bz2
hardflip-98bc232593015bb368635da0a3716c61850695a2.tar.xz
hardflip-98bc232593015bb368635da0a3716c61850695a2.tar.zst
hardflip-98bc232593015bb368635da0a3716c61850695a2.zip
qwe
Diffstat (limited to 'src/c_init.go')
-rw-r--r--src/c_init.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/c_init.go b/src/c_init.go
index 8981099..85eb9c8 100644
--- a/src/c_init.go
+++ b/src/c_init.go
@@ -52,6 +52,8 @@
package main
import (
+ "errors"
+ "fmt"
"os"
"path/filepath"
)
@@ -96,6 +98,16 @@ func c_recurse_data_dir(dir, root string, opts HardOpts,
} else if host_node != nil {
host_node.Filename = filename
host_node.Parent = &dir_node
+ if len(opts.GPG) == 0 {
+ host_node.Pass = ""
+ } else if opts.GPG != "plain" && len(host_node.Pass) > 0 {
+ host_node.Pass, err = c_decrypt_str(host_node.Pass)
+ if err != nil {
+ str := fmt.Sprintf("%s%s: password decryption: %v\n",
+ dir, filename, err)
+ *load_err = append(*load_err, errors.New(str))
+ }
+ }
dir_node.lhost.add_back(host_node)
}
i_draw_load_ui(ui)