summaryrefslogtreecommitdiff
path: root/makechrootpkg.in
diff options
context:
space:
mode:
Diffstat (limited to 'makechrootpkg.in')
-rw-r--r--makechrootpkg.in6
1 files changed, 2 insertions, 4 deletions
diff --git a/makechrootpkg.in b/makechrootpkg.in
index 9e84996..dc598f7 100644
--- a/makechrootpkg.in
+++ b/makechrootpkg.in
@@ -97,10 +97,8 @@ create_chroot() {
stat_busy "Creating clean working copy [$copy]"
if is_btrfs "$chrootdir" && ! mountpoint -q "$copydir"; then
- if [[ -d $copydir ]]; then
- btrfs subvolume delete "$copydir" >/dev/null ||
- die "Unable to delete subvolume %s" "$copydir"
- fi
+ subvolume_delete_recursive "$copydir" ||
+ die "Unable to delete subvolume %s" "$copydir"
btrfs subvolume snapshot "$chrootdir/root" "$copydir" >/dev/null ||
die "Unable to create subvolume %s" "$copydir"
else