mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-07-06 03:56:34 +00:00
runtime: Files are not synced between host and guest VMs
This PR makes the root dir absolute after resolving the default root dir symlink. Fixes: https://github.com/kata-containers/kata-containers/issues/10499 Signed-off-by: Silenio Quarti <silenio_quarti@ca.ibm.com>
This commit is contained in:
parent
a3c72e59b1
commit
be3ea2675c
@ -64,6 +64,14 @@ func resolveRootDir() string {
|
||||
// Use the default root dir in case of any errors resolving the root dir symlink
|
||||
return defaultKubernetesRootDir
|
||||
}
|
||||
// Make root dir an absolute path if needed
|
||||
if !filepath.IsAbs(rootDir) {
|
||||
rootDir, err = filepath.Abs(filepath.Join(filepath.Dir(defaultKubernetesRootDir), rootDir))
|
||||
if err != nil {
|
||||
// Use the default root dir in case of any errors resolving the root dir symlink
|
||||
return defaultKubernetesRootDir
|
||||
}
|
||||
}
|
||||
return rootDir
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user