Closed tompipe closed 3 years ago
hi tom, if possible can you send me the sync pack you are using here ? kevin@jumoo.co.uk .
Hi Tom, exactly as you say - looks like the sync pack has ended up with directory entries in it and we don't copy with them. v8.10.1 fixes this. by using the ExtractToDirectory
method (i think at one point we did it with ExtractToFile so we could update progress - but we don't anymore as unzipping is often fast.)
Describe the bug When uploading a SyncPack, an error seems to occur when extracting the ziparchive.
I've tracked it down to line 429 of the
SyncPackFileService
SafeUnzip
method. It fails when aZipArchiveEntry
is for a folder itself, and not a file, then it fails when attempting to call theExtractToFile
method.In the
System.IO.Compression.ExtractToDirectory
extension method, there are checks on the entry filename and data length to prevent callingExtractToFile
for directories.Adding similar checks to
SafeUnzip
would prevent the error, alternatively calling theExtractToDirectory
extension method might be a better fix, as that handles the mitigation for the change of path seperator in .NET Framework 4.6.1Version (please complete the following information):
To Reproduce Steps to reproduce the behavior:
Expected behavior Syncpack should be uploaded, extracted, and the changes report presented