summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--makechrootpkg.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/makechrootpkg.in b/makechrootpkg.in
index 00e538a..2309be2 100644
--- a/makechrootpkg.in
+++ b/makechrootpkg.in
@@ -142,7 +142,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"