From: Michihiro NAKAJIMA Date: Thu, 15 Oct 2009 22:00:43 +0000 (-0400) Subject: When location has negative value, it can be used for file number. X-Git-Tag: v2.8.0~282 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a59cc6280820d6e8373f8e2b567b3c702e69f680;p=thirdparty%2Flibarchive.git When location has negative value, it can be used for file number. SVN-Revision: 1532 --- 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;