# HG changeset patch # User Pascal Bellard # Date 1208442784 0 # Node ID 2602d2710c44804f07ff4b94efe38af2bf5fbfd9 # Parent a93134a161acc30e7ba83810fedb5945bd35b20f busybox/cpio -o: fix sized dir diff -r a93134a161ac -r 2602d2710c44 busybox/stuff/busybox-1.10.0-cpio.u --- a/busybox/stuff/busybox-1.10.0-cpio.u Thu Apr 17 14:30:53 2008 +0000 +++ b/busybox/stuff/busybox-1.10.0-cpio.u Thu Apr 17 14:33:04 2008 +0000 @@ -68,6 +68,8 @@ + abort_cpio_o: + bb_perror_msg_and_die(name); + } ++ if (!S_ISLNK(inode->st.st_mode) && !S_ISREG(inode->st.st_mode)) ++ inode->st.st_size = 0, + } + + // hard links will are stored and will be processed later @@ -129,7 +131,6 @@ + bytes += printf("%s", lpath); + free(lpath); + } -+ + if (S_ISREG(inode->st.st_mode)) { + int fd = open_or_warn(name, O_RDONLY); + @@ -142,7 +143,6 @@ + } + close(fd); + } -+ + cpio_pad(&bytes, 4-1); + } +