summaryrefslogtreecommitdiff
path: root/src/import/pull-dkr.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/import/pull-dkr.c')
-rw-r--r--src/import/pull-dkr.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/import/pull-dkr.c b/src/import/pull-dkr.c
index 1cd9e7b0bd..831470ff13 100644
--- a/src/import/pull-dkr.c
+++ b/src/import/pull-dkr.c
@@ -24,10 +24,13 @@
#include "sd-daemon.h"
+#include "alloc-util.h"
#include "aufs-util.h"
#include "btrfs-util.h"
#include "curl-util.h"
#include "fd-util.h"
+#include "fileio.h"
+#include "fs-util.h"
#include "hostname-util.h"
#include "import-common.h"
#include "import-util.h"
@@ -42,6 +45,7 @@
#include "string-util.h"
#include "strv.h"
#include "utf8.h"
+#include "web-util.h"
typedef enum DkrProgress {
DKR_SEARCHING,
@@ -479,13 +483,13 @@ static int dkr_pull_make_local_copy(DkrPull *i, DkrPullVersion version) {
if (!i->final_path) {
i->final_path = strjoin(i->image_root, "/.dkr-", i->id, NULL);
if (!i->final_path)
- return log_oom();
+ return -ENOMEM;
}
if (version == DKR_PULL_V2) {
- r = path_get_parent(i->image_root, &p);
- if (r < 0)
- return r;
+ p = dirname_malloc(i->image_root);
+ if (!p)
+ return -ENOMEM;
}
r = pull_make_local_copy(i->final_path, p ?: i->image_root, i->local, i->force_local);