Skip to content

Conversation

@mgirlich
Copy link
Collaborator

Before this PR they errored with argument is of length zero. Now req_url_path_append(req, NULL) works.

path <- paste(c(...), sep = "/", collapse = "/")
# Ensure we don't add duplicate /s
if (!grepl("^/", path)) {
if (path != "" && !grepl("^/", path)) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is necessary b/c paste(collapse = "/") returns "" instead of character().

@mgirlich
Copy link
Collaborator Author

@hadley Is there anything missing to get this merged?

@hadley hadley merged commit bb6406f into r-lib:main Jan 12, 2023
@hadley
Copy link
Member

hadley commented Jan 12, 2023

Nope 😄

@mgirlich mgirlich deleted the empty-path-in-append branch January 13, 2023 06:15
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