Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Instead of throwing "Path too long" error, Expand-Archive throws errors about removing non-existing items #69

Open
NReilingh opened this issue Mar 1, 2019 · 8 comments

Comments

@NReilingh
Copy link

When expanding an archive that contains long file paths to a location that also has a long path, the files to be expanded may have a resulting path that causes an error because it is too long.

When using "Expand All" from within Windows, this results in

Error 0x80010135: Path too long

The same should occur when running Expand-Archive in PowerShell, but what happens instead is that errors are thrown from Remove-Item on this line:

$expandedItems | % { Remove-Item $_ -Force -Recurse }

Remove-Item : Cannot find path {...} because it does not exist.

It appears that this line of code is meant to clean up after a failed expansion, but it is trying to remove items that it hasn't expanded yet, so this would indicate another issue.

@NicolasRouquette
Copy link

I am experiencing the same problem exactly; it is amazing that these windows 95 era path limitation problems are still around 20+ years later.

@NicolasRouquette
Copy link

FYI: There is a workaround for this issue: instead of using Expand-Archive, use 7-zip.
Following this suggestion worked in our environment: https://stackoverflow.com/a/58289112/1009693

Name                           Value                                                           
----                           -----                                                           
PSVersion                      5.1.14393.3866                                                  
PSEdition                      Desktop                                                         
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}                                         
BuildVersion                   10.0.14393.3866                                                 
CLRVersion                     4.0.30319.42000                                                 
WSManStackVersion              3.0                                                             
PSRemotingProtocolVersion      2.3                                                             
SerializationVersion           1.1.0.1   

@SydneyhSmith SydneyhSmith added this to the 1.2.0 milestone Jun 1, 2022
@SydneyhSmith SydneyhSmith added this to To Do in 2.0.0-beta3 via automation Jun 14, 2022
@SydneyhSmith SydneyhSmith removed this from To Do in 2.0.0-beta3 Jul 12, 2022
@SydneyhSmith SydneyhSmith added this to Todo in 2.0.0-beta2 Jul 12, 2022
@SydneyhSmith SydneyhSmith removed this from Todo in 2.0.0-beta2 Aug 10, 2022
@SydneyhSmith SydneyhSmith added this to To Do in 2.0.0-beta3 via automation Aug 10, 2022
@ayousuf23 ayousuf23 moved this from To Do to In Progress in 2.0.0-beta3 Aug 17, 2022
@ayousuf23
Copy link
Collaborator

We will reopen this issue if it is still persistent.

2.0.0-beta3 automation moved this from In Progress to Done Aug 17, 2022
@paololazzari
Copy link

This issue still occurs

@BenjaminNiemann
Copy link

BenjaminNiemann commented Aug 11, 2023

Jep Chap can confirm. Still exists. Whats the reason behind .zip?
image

@paololazzari
Copy link

@ayousuf23 please reopen

@paololazzari
Copy link

@SydneyhSmith please reopen

@SydneyhSmith SydneyhSmith reopened this Aug 11, 2023
@Deondrede
Copy link

Ongoing issue for me please resolve

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

7 participants