diff options
author | Joe <rbo@gmx.us> | 2024-01-31 20:20:20 +0100 |
---|---|---|
committer | Joe <rbo@gmx.us> | 2024-01-31 20:20:20 +0100 |
commit | 98bc232593015bb368635da0a3716c61850695a2 (patch) | |
tree | 43910c482bdcb24702a75e9daece7432443fe015 /src/c_init.go | |
parent | good start (diff) | |
download | hardflip-98bc232593015bb368635da0a3716c61850695a2.tar.gz hardflip-98bc232593015bb368635da0a3716c61850695a2.tar.bz2 hardflip-98bc232593015bb368635da0a3716c61850695a2.tar.xz hardflip-98bc232593015bb368635da0a3716c61850695a2.tar.zst hardflip-98bc232593015bb368635da0a3716c61850695a2.zip |
qwe
Diffstat (limited to '')
-rw-r--r-- | src/c_init.go | 12 |
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) |