-
Notifications
You must be signed in to change notification settings - Fork 604
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
storage: strip leading slash in File() constructor #2269
Conversation
This commit prevents a double leading slash from being included in the uploaded file name when bucket.file() is called with a path starting with a slash. Only a single slash is removed, because it is assumed that if multiple leading slashes are provided, then the user may have done so on purpose.
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed, please reply here (e.g.
|
I signed it! |
CLAs look good, thanks! |
Thank you @cjihrig! I made a small commit with a style change. If that doesn't break, I will merge straight away. |
This commit prevents a double leading slash from being included in the uploaded file name when
bucket.file()
is called with a path starting with a slash. Only a single slash is removed, because it is assumed that if multiple leading slashes are provided, then the user may have done so on purpose.Fixes: #1972