Don't hose up perms for files that happen to have symlinks
[oweals/busybox.git] / archival / libunarchive / decompress_uncompress.c
index 9851ca39d824479eae439d59f529ffc4bd7bcc82..65418a7cacd58a20fe1a0fda8e75541beea55e1e 100644 (file)
@@ -1,8 +1,6 @@
 #include "config.h"
 #include "libbb.h"
 
-#if defined CONFIG_UNCOMPRESS || defined CONFIG_FEATURE_GUNZIP_UNCOMPRESS
-
 /* uncompress for busybox -- (c) 2002 Robert Griebl
  *
  * based on the original compress42.c source 
@@ -166,7 +164,7 @@ extern int uncompress(int fd_in, int fd_out)
                }
 
                if (insize < (int) sizeof(inbuf) - IBUFSIZ) {
-                       rsize = read(fd_in, inbuf + insize, IBUFSIZ);
+                       rsize = safe_read(fd_in, inbuf + insize, IBUFSIZ);
                        insize += rsize;
                }
 
@@ -293,6 +291,3 @@ extern int uncompress(int fd_in, int fd_out)
 
        return 0;
 }
-
-
-#endif