From 2385312345c6928c15230155c903f057059f8789 Mon Sep 17 00:00:00 2001 From: Antynea Date: Wed, 3 Jun 2015 11:05:05 +0200 Subject: [PATCH] fix bug with underscore in subvolume name --- 41_snapshots-btrfs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/41_snapshots-btrfs b/41_snapshots-btrfs index 429e9f4..ab22278 100644 --- a/41_snapshots-btrfs +++ b/41_snapshots-btrfs @@ -45,7 +45,7 @@ unset snapshots oldIFS=$IFS IFS=$'\n' -for snap in $($bindir/btrfs subvolume list -sa / --sort=-ogen | $bindir/awk '{gsub(/^["/"]+/,"",$NF);print $11" "$12"?"$NF}'); do +for snap in $($bindir/btrfs subvolume list -sa / --sort=-ogen | $bindir/awk '{gsub(/^.*\//,"",$NF);print $11" "$12"?"$NF}'); do snap_name="${snap#*"?"}" # Discard deleted snapshots if [ $snap_name = "DELETED" ]; then continue; fi