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

util: fix crash on bare gs://bucket with no path #14

Merged
merged 1 commit into from
Jul 31, 2023

Conversation

wchargin
Copy link
Contributor

@wchargin wchargin commented Jul 8, 2023

  • I have read the Contributor Guide
  • I have read and agree to the Code of Conduct
  • I have added a description of my changes and why I'd like them included in the section below

Running gsutil ls gs://some-bucket-name with no trailing slash used to
crash with:

thread 'main' panicked at 'byte index 1 is out of bounds of ``', src/util.rs:162:32

It now behaves the same as upstream gsutil: that is, it is equivalent
to the same URL if its path part were a single slash.

Fixes #12.

wchargin-branch: fix-bare-bucket

Running `gsutil ls gs://some-bucket-name` with no trailing slash used to
crash with:

    thread 'main' panicked at 'byte index 1 is out of bounds of ``', src/util.rs:162:32

It now behaves the same as upstream `gsutil`: that is, it is equivalent
to the same URL if its path part were a single slash.

wchargin-branch: fix-bare-bucket
wchargin-source: e75a39aade536c955c1caca71bf6938a31886a43
@wchargin wchargin requested a review from Jake-Shadle as a code owner July 8, 2023 22:49
@Jake-Shadle Jake-Shadle merged commit 758903e into EmbarkStudios:main Jul 31, 2023
@wchargin wchargin deleted the wchargin-fix-bare-bucket branch August 1, 2023 17:59
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.

panic when listing bucket without trailing slash
2 participants