]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
When location has negative value, it can be used for file number.
authorMichihiro NAKAJIMA <ggcueroad@gmail.com>
Thu, 15 Oct 2009 22:00:43 +0000 (18:00 -0400)
committerMichihiro NAKAJIMA <ggcueroad@gmail.com>
Thu, 15 Oct 2009 22:00:43 +0000 (18:00 -0400)
SVN-Revision: 1532

libarchive/archive_read_support_format_iso9660.c

index f4feb21b621a8e741ba849950236422e3e9b8136..12e8989e9188b69794f41d86b434d0f400588c5b 100644 (file)
@@ -1562,12 +1562,15 @@ parse_file_info(struct archive_read *a, struct file_info *parent,
         * target. If Rockridge extensions is being used, file number
         * will be overwritten by FILE SERIAL NUMBER of RRIP "PX"
         * extension.
-        * NOTE: Older mkisofs did not record that FILE SERIAL NUMBER
+        * NOTE: Old mkisofs did not record that FILE SERIAL NUMBER
         * in ISO images.
         */
-       if (file->size == 0)
+       if (file->size == 0 && location >= 0)
                /* If file->size is zero, its location points wrong place.
-                * Dot not use it for file number. */
+                * Dot not use it for file number.
+                * When location has negative value, it can be used
+                * for file number.
+                */
                file->number = -1;
        else
                file->number = (int64_t)(uint32_t)location;