1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-01 09:21:26 +03:00

import: properly remove pre-existing images if --force is used

This commit is contained in:
Lennart Poettering 2014-12-26 18:18:47 +01:00
parent 8620a9a323
commit f0be89eee9

View 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;
}