0

I have a .zip Archive generated with compress-archive.

The archive opens fine with Windows Explorer and extracts fine with 7zip.

It has subfolders.

On extraction via extractall + overwritesilently, I get a System.IOException saying that the file already exists. (It is a empty folder with a new Guid in its path.)

When the exception occurs, I see a subfolder/file

temp\822b95bf-af5e-42d9-9d08-0cee1a3f6742\x.y.z\support\DotNetZip-nerkcop3.tmp

nothing else.

Any idea?

I created the file using

compress-archive -Path x -DestinationPath y.zip

Or might that be related to https://github.com/PowerShell/Microsoft.PowerShell.Archive/issues/71 and should I just use 7zip for compression?

Strangely, I created another archive using the same method which extracted fine.

Andreas Reiff
  • 7,961
  • 10
  • 50
  • 104
  • 1
    Typical anti-malware induced problem. – Hans Passant Jun 29 '23 at 12:40
  • MIght be, though it is 100%ly reproducible. I spent some time chaging form compress-archive to 7zip for the compression, problem is gone. Maybe there are some issues with compress-archive. Also I am using the built-in powershell, somehow I could not upgrade it (installed new version but that is not being used), perhaps that would have fixed it. – Andreas Reiff Jun 29 '23 at 19:04

0 Answers0