When attempting to create an ISO file using libarchive.js, the returned archive size is 0 bytes.
However, when creating a gzip file with the same process and files, the output is correct and functional.
Below is the code snippet used for creating the ISO file:
import {
Archive,
ArchiveFormat,
ArchiveCompression,
} from 'libarchive.js/dist/libarchive.js';
// `files` is the files of the input of the file type.
const allFiles = [];
for (let i = 0; i < files.length; i++) {
const file = files[i];
const relativePath =
file.webkitRelativePath || file.relativePath || file.name;
allFiles.push({ file, pathname: relativePath });
}
const archiveFile = await Archive.write({
files: allFiles,
outputFileName: 'mount.iso',
compression: ArchiveCompression.NONE,
format: ArchiveFormat.ISO9660,
passphrase: null,
});
Steps to Reproduce:
Prepare a list of files to be included in the archive (allFiles).
Use the above code snippet to attempt to create an ISO file.
Check the size of the generated mount.iso file.
Expected Behavior:
The ISO file should be created with the appropriate size, containing all the specified files.
Actual Behavior:
The generated ISO file (mount.iso) has a size of 0 bytes.
Additional Information:
The same process works correctly when creating a gzip file.
The issue seems to be specific to the ISO creation format.
No errors or warnings are thrown during the process.
When attempting to create an ISO file using libarchive.js, the returned archive size is 0 bytes. However, when creating a gzip file with the same process and files, the output is correct and functional. Below is the code snippet used for creating the ISO file:
Steps to Reproduce:
Prepare a list of files to be included in the archive (allFiles). Use the above code snippet to attempt to create an ISO file. Check the size of the generated mount.iso file.
Expected Behavior:
The ISO file should be created with the appropriate size, containing all the specified files.
Actual Behavior:
The generated ISO file (mount.iso) has a size of 0 bytes.
Additional Information:
Environment: