index : devtools32 | |
Archlinux32 fork of devtools | gitolite user |
summaryrefslogtreecommitdiff |
author | Luke Shumaker <lukeshu@parabola.nu> | 2017-04-10 17:46:19 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@parabola.nu> | 2017-04-16 23:20:29 -0400 |
commit | 3bd1f2afe30900282b7a70d05a41b03f87527225 (patch) | |
tree | 7a48d00a1169d96a3e377214b1736fd85680805e /lib | |
parent | c9447e89cec803ed614d73c54b38d2ca7d5f0c95 (diff) |
-rw-r--r-- | lib/archroot.sh | 9 |
diff --git a/lib/archroot.sh b/lib/archroot.sh index 6b1b52e..3a1023e 100644 --- a/lib/archroot.sh +++ b/lib/archroot.sh @@ -52,11 +52,14 @@ subvolume_delete_recursive() { is_subvolume "$1" || return 0 while IFS= read -d $'\0' -r subvol; do - if ! btrfs subvolume delete "$subvol" &>/dev/null; then - error "Unable to delete subvolume %s" "$subvol" + if ! subvolume_delete_recursive "$subvol"; then return 1 fi - done < <(find "$1" -xdev -depth -inum 256 -print0) + done < <(find "$1" -mindepth 1 -xdev -depth -inum 256 -print0) + if ! btrfs subvolume delete "$1" &>/dev/null; then + error "Unable to delete subvolume %s" "$subvol" + return 1 + fi return 0 } |