machine-image: use pretty names if we already have them and validated them

This commit is contained in:
Lennart Poettering 2018-04-05 18:01:54 +02:00
parent 4756c94e5e
commit 225219e504
1 changed files with 2 additions and 2 deletions

View File

@ -412,7 +412,7 @@ int image_find(ImageClass class, const char *name, Image **ret) {
return -errno;
}
r = image_make(NULL, dirfd(d), path, name, ret);
r = image_make(name, dirfd(d), path, name, ret);
if (IN_SET(r, 0, -ENOENT)) {
_cleanup_free_ char *raw = NULL;
@ -420,7 +420,7 @@ int image_find(ImageClass class, const char *name, Image **ret) {
if (!raw)
return -ENOMEM;
r = image_make(NULL, dirfd(d), path, raw, ret);
r = image_make(name, dirfd(d), path, raw, ret);
if (IN_SET(r, 0, -ENOENT))
continue;
}