diff --git a/src/freedombone-pass b/src/freedombone-pass index 7d0c65cf..46da2a4b 100755 --- a/src/freedombone-pass +++ b/src/freedombone-pass @@ -118,19 +118,19 @@ fi if [ ${#CURR_PASSWORD} -eq 0 ]; then # retrieve password - if [ ! -f ~/.passwords/$CURR_USER/$CURR_APP ]; then + if [ ! -f ~/.passwords/$CURR_USERNAME/$CURR_APP ]; then echo "" exit 4 else - gpg -dq --passphrase "$MASTER_PASSWORD" ~/.passwords/$CURR_USER/$CURR_APP + gpg -dq --passphrase "$MASTER_PASSWORD" ~/.passwords/$CURR_USERNAME/$CURR_APP fi else # store password - if [ ! -d ~/.passwords/$CURR_USER ]; then - mkdir -p ~/.passwords/$CURR_USER + if [ ! -d ~/.passwords/$CURR_USERNAME ]; then + mkdir -p ~/.passwords/$CURR_USERNAME fi - echo “$CURR_PASSWORD” | gpg -ca --cipher-algo AES256 --passphrase "$MASTER_PASSWORD" > ~/.passwords/$CURR_USER/$CURR_APP - if [ ! -f ~/.passwords/$CURR_USER/$CURR_APP ]; then + echo “$CURR_PASSWORD” | gpg -ca --cipher-algo AES256 --passphrase "$MASTER_PASSWORD" > ~/.passwords/$CURR_USERNAME/$CURR_APP + if [ ! -f ~/.passwords/$CURR_USERNAME/$CURR_APP ]; then exit 5 fi fi