bump runc to v1.1.10

Signed-off-by: tao.yang <tao.yang@daocloud.io>
This commit is contained in:
tao.yang
2023-11-06 10:42:39 +08:00
parent 24e6b03780
commit bb315d1339
10 changed files with 82 additions and 25 deletions

View File

@@ -125,6 +125,7 @@ func CopyDirectory(source string, dest string) error {
if err != nil {
return nil
}
destPath := filepath.Join(dest, relPath)
if info.IsDir() {
// Skip the source directory.
@@ -138,18 +139,20 @@ func CopyDirectory(source string, dest string) error {
uid := int(st.Uid)
gid := int(st.Gid)
if err := os.Mkdir(filepath.Join(dest, relPath), info.Mode()); err != nil {
if err := os.Mkdir(destPath, info.Mode()); err != nil {
return err
}
if err := os.Lchown(filepath.Join(dest, relPath), uid, gid); err != nil {
if err := os.Lchown(destPath, uid, gid); err != nil {
return err
}
if err := os.Chmod(destPath, info.Mode()); err != nil {
return err
}
}
return nil
}
return CopyFile(path, filepath.Join(dest, relPath))
return CopyFile(path, destPath)
})
}