From 04e61057ede5eb0763fb2d6ee5dad665a021f378 Mon Sep 17 00:00:00 2001
From: "Hahn Axel (hahn)" <axel.hahn@iml.unibe.ch>
Date: Mon, 23 Jan 2023 10:42:00 +0100
Subject: [PATCH] transfer.sh: fix touch of last_backup

---
 transfer.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/transfer.sh b/transfer.sh
index 67c5312..9c50881 100755
--- a/transfer.sh
+++ b/transfer.sh
@@ -37,6 +37,7 @@
 # 2022-10-21  ah     v2.7  shell fixes; 
 # 2022-11-04  ah     v2.8  rename hooks
 # 2022-11-07  ah     v2.9  run brefore-transfer hook after registration
+# 2023-02-22  ah     v2.10 fix touch of last_backup
 # ================================================================================
 
 
@@ -416,8 +417,6 @@ function setAction(){
             t_backupDirDoPostTasks
             echo
 
-            touch ${lastbackupfile}
-
         else
           color warning
           echo "DIR SKIP $mydir ... does not exist (no error)"
@@ -425,6 +424,7 @@ function setAction(){
         fi 
         echo
       done
+      test $rc -eq 0 && touch "${lastbackupfile}
     else
       echo "SKIP backup of dirs"
     fi
-- 
GitLab