mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-29 13:28:27 +00:00
files: make convert_path_from_another_mp always return relative path
If dmi->ns_mountpoint is "/" then in dst we will return "/..." - absolute path but we want here path relative to dmi mount. Adding "./" before the path guaranties that it will be always relative. https://jira.sw.ru/browse/PSBM-72351 Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
This commit is contained in:
parent
00524c298e
commit
41cdad6c2d
@ -1383,7 +1383,7 @@ static void convert_path_from_another_mp(char *src, char *dst, int dlen,
|
|||||||
* Absolute path to the mount point + difference between source
|
* Absolute path to the mount point + difference between source
|
||||||
* and destination roots + path relative to the mountpoint.
|
* and destination roots + path relative to the mountpoint.
|
||||||
*/
|
*/
|
||||||
snprintf(dst, dlen, "%s/%s/%s",
|
snprintf(dst, dlen, "./%s/%s/%s",
|
||||||
dmi->ns_mountpoint + 1,
|
dmi->ns_mountpoint + 1,
|
||||||
smi->root + strlen(dmi->root),
|
smi->root + strlen(dmi->root),
|
||||||
src + off);
|
src + off);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user