Skip to content

Commit 6ee4553

Browse files
committed
Fix jjj vs jj bug in recursive snapshot selection
1 parent 6c7da10 commit 6ee4553

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/zfs-auto-snapshot.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,10 +442,15 @@ do
442442
iii="$ii/"
443443

444444

445-
# Exclude datasets that are not named on the command line.
445+
# Exclude datasets
446+
# * that are not named on the command line or
447+
# * those whose prefix is not on the command line (if --recursive flag is set)
446448
IN_ARGS='0'
447449
for jj in "$@"
448450
do
451+
# Ibid regarding iii.
452+
jjj="$jj/"
453+
449454
if [ "$jj" = '//' -o "$jj" = "$ii" ]
450455
then
451456
IN_ARGS=$(( $IN_ARGS + 1 ))

0 commit comments

Comments
 (0)