mirror of
https://github.com/laurent22/rsync-time-backup
synced 2024-12-13 21:52:36 +00:00
More robust path handling.
This commit is contained in:
parent
d425a05528
commit
fe0bfde041
1 changed files with 2 additions and 2 deletions
|
@ -161,11 +161,11 @@ while [ "1" ]; do
|
|||
|
||||
elif [ $stamp -ge $KEEP_DAILIES_DATE ]; then
|
||||
# Delete all but the most recent of each day.
|
||||
[ ${date:8:2} -eq ${prev:8:2} ] && echo rm -rf $DEST_FOLDER/$date
|
||||
[ ${date:8:2} -eq ${prev:8:2} ] && echo rm -rf -- "$DEST_FOLDER/$date"
|
||||
|
||||
else
|
||||
# Delete all but the most recent of each month.
|
||||
[ ${date:5:2} -eq ${prev:5:2} ] && echo rm -rf $DEST_FOLDER/$date
|
||||
[ ${date:5:2} -eq ${prev:5:2} ] && echo rm -rf -- "$DEST_FOLDER/$date"
|
||||
fi
|
||||
|
||||
prev=$date
|
||||
|
|
Loading…
Reference in a new issue