summaryrefslogtreecommitdiff
path: root/src/import/import-tar.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/import/import-tar.c')
-rw-r--r--src/import/import-tar.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/import/import-tar.c b/src/import/import-tar.c
index c5346ca2b0..6ec5504265 100644
--- a/src/import/import-tar.c
+++ b/src/import/import-tar.c
@@ -87,8 +87,7 @@ TarImport* tar_import_unref(TarImport *i) {
}
if (i->temp_path) {
- (void) btrfs_subvol_remove(i->temp_path);
- (void) rm_rf(i->temp_path, REMOVE_ROOT|REMOVE_PHYSICAL);
+ (void) rm_rf(i->temp_path, REMOVE_ROOT|REMOVE_PHYSICAL|REMOVE_SUBVOLUME);
free(i->temp_path);
}
@@ -197,10 +196,8 @@ static int tar_import_finish(TarImport *i) {
return r;
}
- if (i->force_local) {
- (void) btrfs_subvol_remove(i->final_path);
- (void) rm_rf(i->final_path, REMOVE_ROOT|REMOVE_PHYSICAL);
- }
+ if (i->force_local)
+ (void) rm_rf(i->final_path, REMOVE_ROOT|REMOVE_PHYSICAL|REMOVE_SUBVOLUME);
r = rename_noreplace(AT_FDCWD, i->temp_path, AT_FDCWD, i->final_path);
if (r < 0)