summaryrefslogtreecommitdiff
path: root/src/import/import-dkr.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/import/import-dkr.c')
-rw-r--r--src/import/import-dkr.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/import/import-dkr.c b/src/import/import-dkr.c
index fb72f6cee3..2d4e9b398f 100644
--- a/src/import/import-dkr.c
+++ b/src/import/import-dkr.c
@@ -28,6 +28,7 @@
#include "btrfs-util.h"
#include "utf8.h"
#include "mkdir.h"
+#include "path-util.h"
#include "import-util.h"
#include "curl-util.h"
#include "aufs-util.h"
@@ -72,6 +73,7 @@ struct DkrImport {
char *local;
bool force_local;
+ bool grow_machine_directory;
char *temp_path;
char *final_path;
@@ -156,6 +158,8 @@ int dkr_import_new(
if (!i->image_root)
return -ENOMEM;
+ i->grow_machine_directory = path_startswith(i->image_root, "/var/lib/machines");
+
i->index_url = strdup(index_url);
if (!i->index_url)
return -ENOMEM;
@@ -561,6 +565,7 @@ static int dkr_import_pull_layer(DkrImport *i) {
i->layer_job->on_finished = dkr_import_job_on_finished;
i->layer_job->on_open_disk = dkr_import_job_on_open_disk;
i->layer_job->on_progress = dkr_import_job_on_progress;
+ i->layer_job->grow_machine_directory = i->grow_machine_directory;
r = import_job_begin(i->layer_job);
if (r < 0)