Microsoft.PowerShell.Archive icon indicating copy to clipboard operation
Microsoft.PowerShell.Archive copied to clipboard

Missing/Different behavior in file system attributes and directoryseparator char (xplat)

Open WernerMairl opened this issue 7 years ago • 3 comments

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

WernerMairl avatar Feb 22 '18 06:02 WernerMairl

Can you provide more info to replicate this bug? What did the zip file contain?

ayousuf23 avatar Aug 11 '22 18:08 ayousuf23

The issue is documented here and here

Cluster7ck avatar Nov 22 '22 08:11 Cluster7ck

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...

drodiger avatar Dec 10 '22 13:12 drodiger