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:
@@ -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)) {
|
||||
|
Reference in New Issue
Block a user