wok rev 595

busybox/cpio -o: fix sized dir
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Apr 17 14:33:04 2008 +0000 (2008-04-17)
parents a93134a161ac
children 596e875e8374
files busybox/stuff/busybox-1.10.0-cpio.u
line diff
     1.1 --- a/busybox/stuff/busybox-1.10.0-cpio.u	Thu Apr 17 14:30:53 2008 +0000
     1.2 +++ b/busybox/stuff/busybox-1.10.0-cpio.u	Thu Apr 17 14:33:04 2008 +0000
     1.3 @@ -68,6 +68,8 @@
     1.4  +          abort_cpio_o:
     1.5  +                bb_perror_msg_and_die(name);
     1.6  +            }
     1.7 ++            if (!S_ISLNK(inode->st.st_mode) && !S_ISREG(inode->st.st_mode))
     1.8 ++                inode->st.st_size = 0,
     1.9  +        }
    1.10  +
    1.11  +        // hard links will are stored and will be processed later
    1.12 @@ -129,7 +131,6 @@
    1.13  +                bytes += printf("%s", lpath);
    1.14  +                free(lpath);
    1.15  +            }
    1.16 -+
    1.17  +            if (S_ISREG(inode->st.st_mode)) {
    1.18  +                int fd = open_or_warn(name, O_RDONLY);
    1.19  +
    1.20 @@ -142,7 +143,6 @@
    1.21  +                }
    1.22  +                close(fd);
    1.23  +            }
    1.24 -+
    1.25  +            cpio_pad(&bytes, 4-1);
    1.26  +        }
    1.27  +