aboutsummaryrefslogtreecommitdiffstats
path: root/jsaccess
diff options
context:
space:
mode:
Diffstat (limited to 'jsaccess')
-rwxr-xr-xjsaccess/jstore.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/jsaccess/jstore.sh b/jsaccess/jstore.sh
index 72e9550..c7f0c04 100755
--- a/jsaccess/jstore.sh
+++ b/jsaccess/jstore.sh
@@ -182,7 +182,7 @@ action_add() {
clear_name=`basename $clear_path`
_pass_read
_index_decrypt
- if [ `egrep -c "^$clear_name$" $tmp` -ne 0 ]; then
+ if [ `egrep -c "^$clear_name .*$" $tmp` -ne 0 ]; then
echo "File already present with this passphrase"
clean_exit 1
fi
@@ -201,13 +201,13 @@ action_rm() {
clear_name=$1
_pass_read
_index_decrypt
- if [ `egrep -c "^$clear_name$" $tmp` -eq 0 ]; then
+ if [ `egrep -c "^$clear_name .*$" $tmp` -eq 0 ]; then
echo "File does not exist for this passphrase"
clean_exit 1
fi
_file_rm $clear_name
_index_decrypt
- sed -i /^$clear_name$/d $tmp
+ sed -i /"^$clear_name .*$"/d $tmp
_index_encrypt
}