Skip to content

Commit

Permalink
reduced changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jo-pol committed Sep 30, 2024
1 parent 98aca80 commit c664a88
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -364,13 +364,14 @@ public CreateDataFileResult execute(CommandContext ctxt) throws CommandException
+ "as individual DataFiles.";
throw new IOException();
}
var fileEntryName = entry.getName();
var shortName = getShortName(fileEntryName);
logger.fine("ZipEntry, file: " + fileEntryName);
String storageIdentifier = FileUtil.generateStorageIdentifier();
File unzippedFile = new File(getFilesTempDirectory() + "/" + storageIdentifier);
Files.copy(zipFile.getInputStream(entry), unzippedFile.toPath(), StandardCopyOption.REPLACE_EXISTING);
// No need to check the size of this unpacked file against the size limit,
// since we've already checked for that in the first pass.
var fileEntryName = entry.getName();
var shortName = getShortName(fileEntryName);
DataFile datafile = FileUtil.createSingleDataFile(version, null, storageIdentifier, shortName,
MIME_TYPE_UNDETERMINED_DEFAULT,
ctxt.systemConfig().getFileFixityChecksumAlgorithm(), null, false);
Expand Down

0 comments on commit c664a88

Please sign in to comment.