Hi i have problem extracting a zip file which was generated by maven assembly plugin.
|
if (!outputFile.getCanonicalPath().startsWith(outputCanonicalPath)) { |
I debuged into that place and found out that the outputfile does not have a trailing slash but the outputCannonical path variable has.
Thats what i see in the IDE
outputFile = {File@1809} "D:\Users\XXXXXXX\AppData\Local\Temp\dependentrules14443115985707206885"
outputCanonicalPath = "D:\Users\XXXXXXX\AppData\Local\Temp\dependentrules14443115985707206885\"
The zip file header looks like this:
versionMadeBy = 788
fileCommentLength = 0
diskNumberStart = 0
internalFileAttributes = {byte[2]@1817} [0, 0]
externalFileAttributes = {byte[4]@1818} [16, 0, -19, 65]
offsetLocalHeader = 5294
fileComment = null
versionNeededToExtract = 10
generalPurposeFlag = {byte[2]@1819} [0, 0]
compressionMethod = {CompressionMethod@1820} "STORE"
lastModifiedTime = 1412516727
crc = 0
compressedSize = 0
uncompressedSize = 0
fileNameLength = 1
extraFieldLength = 0
fileName = "/"
isEncrypted = false
encryptionMethod = {EncryptionMethod@1822} "NONE"
dataDescriptorExists = false
zip64ExtendedInfo = null
aesExtraDataRecord = null
fileNameUTF8Encoded = false
extraDataRecords = null
isDirectory = true
signature = {HeaderSignature@1823} "CENTRAL_DIRECTORY"
Any solution to this? Is this a bug? Anyone had the same problem?
Hi i have problem extracting a zip file which was generated by maven assembly plugin.
zip4j/src/main/java/net/lingala/zip4j/tasks/AbstractExtractFileTask.java
Line 53 in ed9eed5
I debuged into that place and found out that the outputfile does not have a trailing slash but the outputCannonical path variable has.
Thats what i see in the IDE
The zip file header looks like this:
Any solution to this? Is this a bug? Anyone had the same problem?