allow blackbox_edit to work with either encrypted or plaintext file name

This commit is contained in:
bendra
2014-10-19 20:55:47 -07:00
parent 47b9c1a4f2
commit 2f9dd20544

View File

@@ -7,7 +7,8 @@ set -e
. _blackbox_common.sh
for param in """$@""" ; do
if ! is_on_cryptlist "$param" ; then
unencrypted_file=$(get_unencrypted_filename "$param")
if [[! is_on_cryptlist "$param" ]] && [[! is_on_cryptlist "$unencrypted_file" ]] ; then
read -p "Encrypt file $param? (y/n) " ans
case "$ans" in
y* | Y*)