---
 makechrootpkg.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/makechrootpkg.in b/makechrootpkg.in
index 8c64ae1..167ee2f 100644
--- a/makechrootpkg.in
+++ b/makechrootpkg.in
@@ -140,7 +140,7 @@ create_chroot() {
                slock 8 "$chrootdir/root.lock" "Locking clean chroot"
 
                stat_busy "Creating clean working copy [$copy]"
-               if [[ "$chroottype" == btrfs ]]; then
+               if [[ "$chroottype" == btrfs ]] && ! mountpoint -q "$copydir"; 
then
                        if [[ -d $copydir ]]; then
                                btrfs subvolume delete "$copydir" >/dev/null ||
                                        die "Unable to delete subvolume %s" 
"$copydir"
-- 
1.8.4

Reply via email to