Fixing warning that *.zip appears to use backslashes as path separators
In my PowerShell script, which updated the content at my Personal site, became errors. I really don’t know why it stopped working at one moment, but started to debug.
I’ve got a warning, that zip appears to use backslashes as path separators
warning: /var/www/admin/www/mysite/Draft.zip appears to use backslashes as path separators
Zip compression is made with PowerShell command Compress-Archive
$compress = @{
Path = "$($bildDir)\$($dirs[0])", "$($bildDir)\$($dirs[1])", "$($bildDir)\$($dirs[2])"
CompressionLevel = "Fastest"
DestinationPath = "$bildDir\Draft.zip"
}
Compress-Archive @compress -Update
This bug was described at GitHub and the solution is to update ‘Module Microsoft.PowerShell.Archive’.
Install-Module Microsoft.PowerShell.Archive -MinimumVersion 1.2.3.0 -Repository PSGallery -Force -AllowClobber