Turn paths from cmdline into absolute paths
Snapshotter service returning relative paths confuses the client (i.e. ctr). Closes: #6671 Signed-off-by: Eric Lin <linxiulei@gmail.com>
This commit is contained in:
parent
d394e00c7e
commit
44a8ac7b0c
@ -323,6 +323,13 @@ func applyFlags(context *cli.Context, config *srvconfig.Config) error {
|
|||||||
} {
|
} {
|
||||||
if s := context.GlobalString(v.name); s != "" {
|
if s := context.GlobalString(v.name); s != "" {
|
||||||
*v.d = s
|
*v.d = s
|
||||||
|
if v.name == "root" || v.name == "state" {
|
||||||
|
absPath, err := filepath.Abs(s)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
*v.d = absPath
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user