summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2020-09-18 12:48:25 +0200
committerErich Eckner <git@eckner.net>2020-09-18 12:48:25 +0200
commit4dc028163dc5ef2545303556f95143022a11310c (patch)
tree8d2257849a3c006daba0105a5c3e92e13164a786
parent5799068670ecbcfa4f1a7ce55d7ca26215a68b5c (diff)
downloadhardlinkedBackups-4dc028163dc5ef2545303556f95143022a11310c.tar.xz
backup: delete empty backups directly at the end of backing up
-rwxr-xr-xbackup.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/backup.in b/backup.in
index 7bea69f..bd3d38b 100755
--- a/backup.in
+++ b/backup.in
@@ -232,7 +232,7 @@ erg=$?
[ -n "${backgroundPid}" ] && kill "${backgroundPid}"
-if [ ${erg} -eq 0 ] || [ ${erg} -eq 24 ]; then
+if [ ${erg} -eq 0 ] || [ ${erg} -eq 24 ] && ! rmdir "${neues}/wip" 2>/dev/null; then
chmod o-rwx "${neues}/wip"
neueres_Datum="${Basis}/$(date "+%Y_%m_%d")"
if [ ! -e "${neueres_Datum}" ]; then