From: Karel Zak Date: Tue, 27 Feb 2007 15:49:25 +0000 (+0100) Subject: mkfs.cramfs: fix a way how mkfs works with empty files X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2bfcd20b8d78ee9191cbfc4ea420f44ecdfb25cd;p=util-linux mkfs.cramfs: fix a way how mkfs works with empty files Signed-off-by: Karel Zak --- 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,