From a59cc6280820d6e8373f8e2b567b3c702e69f680 Mon Sep 17 00:00:00 2001 From: Michihiro NAKAJIMA Date: Thu, 15 Oct 2009 18:00:43 -0400 Subject: [PATCH] When location has negative value, it can be used for file number. SVN-Revision: 1532 --- libarchive/archive_read_support_format_iso9660.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libarchive/archive_read_support_format_iso9660.c b/libarchive/archive_read_support_format_iso9660.c index f4feb21b6..12e8989e9 100644 --- a/libarchive/archive_read_support_format_iso9660.c +++ b/libarchive/archive_read_support_format_iso9660.c @@ -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; -- 2.47.3