]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Include O_BINARY when opening the file here, for consistency.
authorTim Kientzle <kientzle@gmail.com>
Sun, 24 May 2009 23:03:06 +0000 (19:03 -0400)
committerTim Kientzle <kientzle@gmail.com>
Sun, 24 May 2009 23:03:06 +0000 (19:03 -0400)
SVN-Revision: 1101

libarchive/archive_read_disk_entry_from_file.c

index 6e12517b5e587a960c17303cef067422d6b40a1d..6cd967cf3fd1ed8be879f855b2e934232fa38701 100644 (file)
@@ -102,7 +102,7 @@ archive_read_disk_entry_from_file(struct archive *_a,
         * open file descriptor which we can use in the subsequent lookups. */
        if ((S_ISREG(st->st_mode) || S_ISDIR(st->st_mode))) {
                if (fd < 0)
-                       fd = open(pathname, O_RDONLY | O_NONBLOCK);
+                       fd = open(pathname, O_RDONLY | O_NONBLOCK | O_BINARY);
                if (fd >= 0) {
                        unsigned long stflags;
                        int r = ioctl(fd, EXT2_IOC_GETFLAGS, &stflags);