summaryrefslogtreecommitdiff
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 052ab71..71fd5d9 100644
--- a/makechrootpkg.in
+++ b/makechrootpkg.in
@@ -164,7 +164,7 @@ create_chroot() {
clean_temporary() {
stat_busy "Removing temporary copy [%s]" "$copy"
- if [[ "$chroottype" == btrfs ]]; then
+ if [[ "$chroottype" == btrfs ]] && ! mountpoint -q "$copydir"; then
btrfs subvolume delete "$copydir" >/dev/null ||
die "Unable to delete subvolume %s" "$copydir"
else