diff --git a/cmd/oras/internal/fileref/unix.go b/cmd/oras/internal/fileref/unix.go index d13a80fbd..fac7f378c 100644 --- a/cmd/oras/internal/fileref/unix.go +++ b/cmd/oras/internal/fileref/unix.go @@ -23,7 +23,9 @@ import ( ) // Parse parses file reference on unix. -func Parse(reference string, mediaType string) (filePath, mediatype string, err error) { +func Parse(reference string, defaultMediaType string) (filePath, mediaType string, err error) { + filePath = reference + mediaType = defaultMediaType i := strings.LastIndex(reference, ":") if i >= 0 { filePath, mediatype = reference[:i], reference[i+1:]