From 2bfcd20b8d78ee9191cbfc4ea420f44ecdfb25cd Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 27 Feb 2007 16:49:25 +0100 Subject: [PATCH] mkfs.cramfs: fix a way how mkfs works with empty files Signed-off-by: Karel Zak --- disk-utils/mkfs.cramfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/disk-utils/mkfs.cramfs.c b/disk-utils/mkfs.cramfs.c index ac2a308a..23878248 100644 --- a/disk-utils/mkfs.cramfs.c +++ b/disk-utils/mkfs.cramfs.c @@ -661,7 +661,7 @@ write_data(struct entry *entry, char *base, unsigned int offset) { if (e->same) { set_data_offset(e, base, e->same->offset); e->offset = e->same->offset; - } else { + } else if (e->size) { set_data_offset(e, base, offset); e->offset = offset; offset = do_compress(base, offset, e->name, -- 2.39.5