Skip to content

Commit b0a5909

Browse files
author
Jonathan Carter
authored
Merge pull request #42 from FransUrbo/snapname_fix
Fix SNAPNAME and SNAPGLOB.
2 parents 3689b2c + 6e32b25 commit b0a5909

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/zfs-auto-snapshot.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -569,10 +569,10 @@ SNAPPROP="-o com.sun:auto-snapshot-desc='$opt_event'"
569569
DATE=$(date --utc +%F-%H%M)
570570

571571
# The snapshot name after the @ symbol.
572-
SNAPNAME="$opt_prefix${opt_label:+$opt_sep$opt_label}-$DATE"
572+
SNAPNAME="${opt_prefix:+$opt_prefix$opt_sep}${opt_label:+$opt_label}-$DATE"
573573

574574
# The expression for matching old snapshots. -YYYY-MM-DD-HHMM
575-
SNAPGLOB="$opt_prefix${opt_label:+?$opt_label}????????????????"
575+
SNAPGLOB="${opt_prefix:+$opt_prefix$opt_sep}${opt_label:+$opt_label}-???????????????"
576576

577577
if [ -n "$opt_do_snapshots" ]
578578
then

0 commit comments

Comments
 (0)