diff options
Diffstat (limited to 'usr.sbin/makefs/cd9660/cd9660_write.c')
-rw-r--r-- | usr.sbin/makefs/cd9660/cd9660_write.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.sbin/makefs/cd9660/cd9660_write.c b/usr.sbin/makefs/cd9660/cd9660_write.c index 46d4a34..4622701 100644 --- a/usr.sbin/makefs/cd9660/cd9660_write.c +++ b/usr.sbin/makefs/cd9660/cd9660_write.c @@ -294,10 +294,12 @@ cd9660_write_file(FILE *fd, cd9660node *writenode) INODE_WARNX(("%s: writing inode %d blocks at %" PRIu32, __func__, (int)inode->st.st_ino, inode->ino)); inode->flags |= FI_WRITTEN; - cd9660_compute_full_filename(writenode, - temp_file_name, 0); + if (writenode->node->contents == NULL) + cd9660_compute_full_filename(writenode, + temp_file_name, 0); ret = cd9660_copy_file(fd, writenode->fileDataSector, - temp_file_name); + (writenode->node->contents != NULL) ? + writenode->node->contents : temp_file_name); if (ret == 0) goto out; } |