tmpfiles: don't allow label_fix to print ENOENT when we want to ignore it

This commit is contained in:
Lukas Nykryn 2014-01-09 18:00:50 +01:00
parent 277f2f75f6
commit f58ceb21e9

View file

@ -436,8 +436,6 @@ finish:
}
static int item_set_perms_full(Item *i, const char *path, bool ignore_enoent) {
int r;
/* not using i->path directly because it may be a glob */
if (i->mode_set)
if (chmod(path, i->mode) < 0) {
@ -458,8 +456,7 @@ static int item_set_perms_full(Item *i, const char *path, bool ignore_enoent) {
}
}
r = label_fix(path, false, false);
return r == -ENOENT && ignore_enoent ? 0 : r;
return label_fix(path, ignore_enoent, false);
}
static int item_set_perms(Item *i, const char *path) {