Skip to content

Commit d625c53

Browse files
committed
Merge pull request #25 from stuehmer/patch-1
Fix SNAPNAME to contain the DATE if label is empty
2 parents 39bce83 + dc6f5dd commit d625c53

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/zfs-auto-snapshot.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ SNAPPROP="-o com.sun:auto-snapshot-desc='$opt_event'"
507507
DATE=$(date --utc +%F-%H%M)
508508

509509
# The snapshot name after the @ symbol.
510-
SNAPNAME="$opt_prefix${opt_label:+$opt_sep$opt_label-$DATE}"
510+
SNAPNAME="$opt_prefix${opt_label:+$opt_sep$opt_label}-$DATE"
511511

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

0 commit comments

Comments
 (0)