fix: oci pull directory conflict when download twice (#914)

* fix: oci pull directory conflict when download twice

Signed-off-by: yxxhero <aiopsclub@163.com>

* add test cases
This commit is contained in:
yxxhero
2023-07-23 21:10:03 +08:00
committed by GitHub
parent d44b94cd68
commit 67ab08ab5e
6 changed files with 40 additions and 15 deletions
+2 -2
View File
@@ -4,7 +4,7 @@ import (
"errors"
"io/fs"
"os"
"path"
"path/filepath"
"strings"
"testing"
)
@@ -102,7 +102,7 @@ func TestFsTeadFile(t *testing.T) {
for _, c := range cases {
t.Run(c.name, func(t *testing.T) {
dir := t.TempDir()
yamlPath := path.Join(dir, c.path)
yamlPath := filepath.Join(dir, c.path)
dfs := DefaultFileSystem()
tmpfile, err := os.Create(yamlPath)