From 5f2200b2c7e0f3ab36e67e2def6bbb8195bba662 Mon Sep 17 00:00:00 2001 From: Gao Xiang Date: Tue, 13 May 2025 23:57:39 +0800 Subject: [PATCH] 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 --- plugins/diff/erofs/differ_linux.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/diff/erofs/differ_linux.go b/plugins/diff/erofs/differ_linux.go index 83cb9f844..f84115258 100644 --- a/plugins/diff/erofs/differ_linux.go +++ b/plugins/diff/erofs/differ_linux.go @@ -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")