Skip to content

Correctly handle public Azure Blob Storage containers containing one file #54

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

petergs
Copy link
Contributor

@petergs petergs commented Jun 5, 2025

This PR (1) correctly handles single-file public containers for Azure Blob Storage and (2) updates input file line counting logic to correctly handle empty lines at the end of the file (permutations.txt).

For (1), the current script will print Empty Public Container Available: for a public Azure Blob Storage container with a single file. The fix wraps the XML response in an array to ensure that $foundUrl is a single-element Object[] rather than a single XmlElement (whose .Length property would be $null) when there is only one file in the container.

For (2), calls to Write-Progress will error when there are empty lines anywhere in $Permutations or $Folders as the words iterator will exceed the line count calculation. This results in a value >100 getting passed to the -PercentComplete parameter.

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

Successfully merging this pull request may close these issues.

1 participant