Signed-off-by: Joe Ferguson <joe@infosiftr.com>
| ... | ... |
@@ -52,7 +52,7 @@ done |
| 52 | 52 |
# now, let's go destroy individual btrfs subvolumes, if any exist |
| 53 | 53 |
if command -v btrfs > /dev/null 2>&1; then |
| 54 | 54 |
root="$(df "$dir" | awk 'NR>1 { print $NF }')"
|
| 55 |
- root="${root#/}" # if root is "/", we want it to become ""
|
|
| 55 |
+ root="${root%/}" # if root is "/", we want it to become ""
|
|
| 56 | 56 |
for subvol in $(btrfs subvolume list -o "$root/" 2>/dev/null | awk -F' path ' '{ print $2 }' | sort -r); do
|
| 57 | 57 |
subvolDir="$root/$subvol" |
| 58 | 58 |
if dir_in_dir "$subvolDir" "$dir"; then |