summaryrefslogtreecommitdiff
path: root/src/import
diff options
context:
space:
mode:
Diffstat (limited to 'src/import')
-rw-r--r--src/import/import-dkr.c2
-rw-r--r--src/import/import.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/import/import-dkr.c b/src/import/import-dkr.c
index 05b10621bc..8f26191c40 100644
--- a/src/import/import-dkr.c
+++ b/src/import/import-dkr.c
@@ -1131,7 +1131,7 @@ int dkr_import_pull(DkrImport *import, const char *name, const char *tag, const
n->force_local = force_local;
}
- r = hashmap_put(import->names, name, n);
+ r = hashmap_put(import->names, n->name, n);
if (r < 0)
return r;
diff --git a/src/import/import.c b/src/import/import.c
index 8b9ca4f724..54f311363a 100644
--- a/src/import/import.c
+++ b/src/import/import.c
@@ -73,7 +73,7 @@ static int pull_dkr(int argc, char *argv[], void *userdata) {
local = name;
}
- if (streq(local, "-") || isempty(local))
+ if (isempty(local) || streq(local, "-"))
local = NULL;
if (!dkr_name_is_valid(name)) {
@@ -89,7 +89,7 @@ static int pull_dkr(int argc, char *argv[], void *userdata) {
if (local) {
const char *p;
- if (!machine_name_is_valid(tag)) {
+ if (!machine_name_is_valid(local)) {
log_error("Local image name '%s' is not valid.", local);
return -EINVAL;
}