Commit e55236f5 authored by Pavel Emelyanov's avatar Pavel Emelyanov

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: 's avatarPavel Emelyanov <xemul@parallels.com>
Acked-by: 's avatarAndrew Vagin <avagin@odin.com>
parent 97cb181c
......@@ -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)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment