From 1604af36b8cf0391ecd9ce11b5548f0db8178e53 Mon Sep 17 00:00:00 2001
From: Bob Mottram <bob@robotics.uk.to>
Date: Sun, 5 Jul 2015 10:50:14 +0100
Subject: [PATCH] Don't need subtraction

---
 src/freedombone            | 1 -
 src/freedombone-config     | 1 -
 src/freedombone-recoverkey | 1 -
 3 files changed, 3 deletions(-)

diff --git a/src/freedombone b/src/freedombone
index b68a99e89..9376c0f12 100755
--- a/src/freedombone
+++ b/src/freedombone
@@ -3819,7 +3819,6 @@ function backup_to_friends_servers {
       echo '        if [ $REMOTE_DOMAIN ]; then' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
       echo "            cd /home/$MY_USERNAME/.gnupg_fragments" >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
       echo '            no_of_shares=$(ls -afq keyshare.asc.* | wc -l)' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
-      echo '            no_of_shares=$((no_of_shares - 2))' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
       echo '            if (( no_of_shares > 0 )); then' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
       echo '                # Pick a share index based on the domain name' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
       echo '                # This ensures that the same share is always given to the same domain' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
diff --git a/src/freedombone-config b/src/freedombone-config
index d19725ed6..99aa29a06 100755
--- a/src/freedombone-config
+++ b/src/freedombone-config
@@ -279,7 +279,6 @@ function reconstruct_key {
     fi
     cd /home/$MY_USERNAME/.gnupg_fragments
     no_of_shares=$(ls -afq keyshare.asc.* | wc -l)
-    no_of_shares=$((no_of_shares - 2))
     if (( no_of_shares < 4 )); then
         dialog --title "Encryption keys" --msgbox 'Not enough fragments to reconstruct the key' 6 70
         exit 7348
diff --git a/src/freedombone-recoverkey b/src/freedombone-recoverkey
index 46ca3282f..8d9dc3eec 100755
--- a/src/freedombone-recoverkey
+++ b/src/freedombone-recoverkey
@@ -128,7 +128,6 @@ fi
 # was anything downloaded?
 cd $FRAGMENTS_DIR
 no_of_shares=$(ls -afq keyshare.asc.* | wc -l)
-no_of_shares=$((no_of_shares - 2))
 if (( no_of_shares == 0 )); then
     echo 'No key fragments were retrieved'
     exit 76882
-- 
GitLab