diff --git a/criu/files-reg.c b/criu/files-reg.c index 07b0bc4e5..13719990a 100644 --- a/criu/files-reg.c +++ b/criu/files-reg.c @@ -1513,10 +1513,8 @@ static int make_parent_dirs_if_need(int mntns_root, char *path) struct stat st; p = last_delim = strrchr(path, '/'); - if (!p) { - pr_err("Path %s has no parent dir\n", path); - return -1; - } + if (!p) + return 0; *p = '\0'; if (fstatat(mntns_root, path, &st, AT_EMPTY_PATH) == 0)