]> err.no Git - util-linux/commitdiff
mkfs.cramfs: fix a way how mkfs works with empty files
authorKarel Zak <kzak@redhat.com>
Tue, 27 Feb 2007 15:49:25 +0000 (16:49 +0100)
committerKarel Zak <kzak@redhat.com>
Tue, 27 Feb 2007 15:49:25 +0000 (16:49 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
disk-utils/mkfs.cramfs.c

index ac2a308af4d01380dd07ed8748ddeb88ae591a92..23878248ca1af7e3182d3161225f3914ea463b91 100644 (file)
@@ -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,