Description
Repro:
Create two directories; populate the first directory (c:\FolderA) with one or more files and leave the second directory (c:\FolderB) empty.
Step 1: Create the initial zip file using FolderA
Compress-Archive -Path c:\FolderA -DestinationPath .\myfolders.zip
Step 2: Update the zip file with FolderB
Compress-Archive -Path c:\FolderB -DestinationPath .\myfolders.zip
Expected: The target zip file is created as step 1 and not updated as step 2
Actual: The target zip file is deleted in step 2 due to FolderB being empty.
Module Information:
ModuleType Version Name ExportedCommands
Manifest 1.1.0.0 Microsoft.PowerShell.Archive {Compress-Archive, Expand-Archive}
PSVersionTable
Name Value
PSVersion 6.0.0-beta
PSEdition Core
GitCommitId v6.0.0-beta.5-34-g1a8563336a1a7f297c05fe06d732994f8efa8691
OS Microsoft Windows 10.0.16262
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0