mirror of
https://github.com/containerd/containerd.git
synced 2026-08-05 15:40:38 +00:00
erofs-differ: fix EROFS native image support
A dumb bug was just found after I worked out a usable native converter [1], instead of relying on some prebuilt image.. [1] https://github.com/erofs/erofs-container-toolkit Signed-off-by: Gao Xiang <xiang@kernel.org>
This commit is contained in:
@@ -76,8 +76,8 @@ func NewErofsDiffer(store content.Store, mkfsExtraOpts []string) differ {
|
||||
// Since `images.DiffCompression` doesn't support arbitrary media types,
|
||||
// disallow non-empty suffixes for now.
|
||||
func isErofsMediaType(mt string) bool {
|
||||
mediaType, ext, ok := strings.Cut(mt, "+")
|
||||
if !ok || ext != "" {
|
||||
mediaType, _, hasExt := strings.Cut(mt, "+")
|
||||
if hasExt {
|
||||
return false
|
||||
}
|
||||
return strings.HasSuffix(mediaType, ".erofs")
|
||||
|
||||
Reference in New Issue
Block a user