Microsoft.PowerShell.Archive
Microsoft.PowerShell.Archive copied to clipboard
Missing/Different behavior in file system attributes and directoryseparator char (xplat)
Hi Not sure if this is the right place for my problem/story.. please advice!
Use case/full story i have a directory structure like the following inside a git repo on bitbucket:
/src/folder/filenameWithUmlauteÄÖÜß.txt
using Windows 10 with Powershell Core (6.0.1) on my dev machine!
Using Bitbucket Webiste => Download Branch as zip to my dev machine (Windows 10)
- extracting the zip using windows explorer => works fine!
- uploading the (unmodified) zip file to a ubuntu 16.04 machine and extract with "unzip" => works fine
- extracting the zip using windows explorer, create zip from the extracted folder by using windows explorer, uploading the resulting zip to ubuntu and extracting with unzip =works fine
Not working:
- extract the zip with pwsh (expand-archive), create a new zip using compress-archive, upload to ubuntu, unzip
issues:
- warning "zip appears to use backslashes as path separators"
- all the special characters (german umlaute) are not readable
- one subfolder can't be deleted with rm - permission denied
investigations i have used "unzip -Z" on the ubuntu machine to see the details of the zip files. basic differences
Zip file coming from windows explorer (or bitbucket) shows
- slash as Directoryseparator char
- more/different file attributes
Zip file created by pwsh - Compress-Archive shows:
- backslash as Directoryseparator
- less/different Attributes
My Questions:
- what i'm doing wrong ?
- there are arguments inside compress-archive to enforce the same behavior like windows explorer ?
- any other suggestions ?
i have a lot of experience in windows/dotnet/powershell, i'm new on linux and i like the dotnetcore/powershellcore way to do and learn xplat.....
regards Werner
Can you provide more info to replicate this bug? What did the zip file contain?
Hi, when is this going to be fixed? It is just one character ;-) I had to use 7zip for zipping, instead of simple PS command...