fix mkdir on windows

This commit is contained in:
Michael Yang
2023-09-19 09:36:30 -07:00
parent 24580df958
commit b58d5d16b0
4 changed files with 7 additions and 7 deletions

View File

@@ -1161,8 +1161,8 @@ func PushModel(ctx context.Context, name string, regOpts *RegistryOptions, fn fu
return err
}
if strings.HasPrefix(path.Base(location.Path), "sha256:") {
layer.Digest = path.Base(location.Path)
if strings.HasPrefix(filepath.Base(location.Path), "sha256:") {
layer.Digest = filepath.Base(location.Path)
fn(api.ProgressResponse{
Status: "using existing layer",
Digest: layer.Digest,