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

sql: fix potential panic in maybe_add_file #1650

Merged
merged 1 commit into from
Jun 22, 2020
Merged

Conversation

link2xt
Copy link
Collaborator

@link2xt link2xt commented Jun 21, 2020

When maybe_add_file was called with "$BLOBDIR" it tried to remove 9
bytes from the string, while it only contains 8.

When maybe_add_file was called with "$BLOBDIR" it tried to remove 9
bytes from the string, while it only contains 8.
@link2xt
Copy link
Collaborator Author

link2xt commented Jun 21, 2020

Once https://doc.rust-lang.org/std/primitive.str.html#method.strip_prefix is stable, it's better to switch to it.

Edit: it's already stabilized, just not released yet: rust-lang/rust#72466

@link2xt link2xt merged commit 8de1bc6 into master Jun 22, 2020
@link2xt link2xt deleted the maybe-add-file-panic branch June 22, 2020 10:22
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.

2 participants