chiark / gitweb /
import: properly remove pre-existing images if --force is used
authorLennart Poettering <lennart@poettering.net>
Fri, 26 Dec 2014 17:18:47 +0000 (18:18 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 26 Dec 2014 18:33:15 +0000 (19:33 +0100)
src/import/import-dkr.c

index 1658053..fbd6412 100644 (file)
@@ -411,12 +411,12 @@ static void dkr_import_name_maybe_finish(DkrImportName *name) {
 
                 if (name->force_local) {
                         (void) btrfs_subvol_remove(p);
-                        (void) rm_rf(p, false, true, false);
+                        (void) rm_rf_dangerous(p, false, true, false);
                 }
 
                 r = btrfs_subvol_snapshot(q, p, false, false);
                 if (r < 0) {
-                        log_error_errno(r, "Failed to snapshot final image: %m");
+                        log_error_errno(r, "Failed to snapshot local image: %m");
                         dkr_import_finish(name->import, r);
                         return;
                 }