Skip to content

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

@NReilingh

Description

@NReilingh

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions