mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-31 06:15:24 +00:00
cg: Keep "/" in cgroup root paths
The ftw trims tail "/" from path argument. Signed-off-by: Pavel Emelyanov <xemul@parallels.com> Acked-by: Tycho Andersen <tycho.andersen@canonical.com>
This commit is contained in:
4
cgroup.c
4
cgroup.c
@@ -244,7 +244,11 @@ static int add_cgroup(const char *fpath, const struct stat *sb, int typeflag)
|
||||
}
|
||||
|
||||
/* chop off the first "/proc/self/fd/N" str */
|
||||
if (fpath[path_pref_len] == '\0')
|
||||
ncd->path = xstrdup("/");
|
||||
else
|
||||
ncd->path = xstrdup(fpath + path_pref_len);
|
||||
|
||||
if (!ncd->path) {
|
||||
ret = -1;
|
||||
goto out;
|
||||
|
Reference in New Issue
Block a user