GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — Mrdrwest issue#66 bugfix by mrdrwest · Pull Request #68 · PowerShell/Microsoft.PowerShell.Archive Conversation
|
There was an error while loading. Please reload this page.
|
The modification processes hidden files, but it does not preserve the compressed files Hidden attribute in the zip archive. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Resubmitted due to build failure.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this PR. It's off to a good start, but I left some comments about whitespace changes that should be undone, and I tried to answer the question you left in a comment.
Also, for this PR to be accepted, additional Pester tests should be added to verify that it works on Windows/macOS/Linux, archiving hidden files and restoring them as hidden.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| $createdItem = New-Item -Path $DestinationPath -ItemType Directory -Confirm:$isConfirm -Verbose:$isVerbose -ErrorAction Stop | ||
| if($createdItem -ne $null -and $createdItem.PSProvider.Name -ne "FileSystem") | ||
| if($null -ne $createdItem -and $createdItem.PSProvider.Name -ne "FileSystem") | ||
| { |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this PR, and for some of the best practice changes. It is very much appreciated.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| $archiveFileStream = New-Object -TypeName System.IO.FileStream -ArgumentList $archiveFileStreamArgs | ||
|
|
||
| $zipArchiveArgs = @($archiveFileStream, [System.IO.Compression.ZipArchiveMode]::Update, $false) |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
It looks like you have additional whitespace changes in the PR that shouldn't be included. Can you please remove them?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| $zipArchive = New-Object -TypeName System.IO.Compression.ZipArchive -ArgumentList $zipArchiveArgs | ||
|
|
||
| $currentEntryCount = 0 |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Ditto on whitespace changes.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| $relativeFilePath = [System.IO.Path]::GetFileName($currentFilePath) | ||
| } | ||
|
|
||
| # Update mode is selected. |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Ditto on whitespace changes.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| $srcStream = New-Object System.IO.BinaryReader $currentFileStream | ||
|
|
||
| $entryPath = DirectorySeparatorNormalizeHelper $relativeFilePath |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Ditto on whitespace changes.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| { | ||
| $destStream.Write($buffer, 0, $numberOfBytesRead) | ||
| $destStream.Write($buffer, 0, $numberOfBytesRead) # can file attributes be specified here | ||
| $destStream.Flush() |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
To address your comment, looking at the docs it seems that each ZipArchiveEntry has an ExternalAttributes property that is OS and application dependent. I would start testing with that property, see what is captured in it when an archive is created, and what can be restored when an archive is extracted.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
/azp run PowerShell.Microsoft.PowerShell.Archive |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Azure Pipelines successfully started running 1 pipeline(s). |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
At least 1 approving review is required to merge this pull request.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.