* 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;