2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-31 14:25:49 +00:00

ghost: Fix off-by-one when printing ghost path

The rfi->path doesn't contain the leading /, neither does the ghost->rpath,
so when attaching it to root don't forget to include one there.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Acked-by: Andrew Vagin <avagin@odin.com>
This commit is contained in:
Pavel Emelyanov
2015-09-29 17:18:00 +03:00
parent 97cb181cbc
commit e55236f586

View File

@@ -105,7 +105,7 @@ static int create_ghost(struct ghost_file *gf, GhostFileEntry *gfe, struct cr_im
goto err;
}
snprintf(path + ret, sizeof(path) - ret, "%s", gf->remap.rpath);
snprintf(path + ret, sizeof(path) - ret, "/%s", gf->remap.rpath);
ret = -1;
if (S_ISFIFO(gfe->mode)) {