Skip to content

Commit

Permalink
nchar not length for strings
Browse files Browse the repository at this point in the history
  • Loading branch information
dblodgett-usgs committed May 23, 2024
1 parent 0515f8e commit 559cef3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/stores.R
Original file line number Diff line number Diff line change
Expand Up @@ -399,8 +399,8 @@ HttpStore <- R6::R6Class("HttpStore",
initialize = function(url, options = NA, headers = NA) {
super$initialize()
# Remove trailing slash if necessary.
if(substr(url, length(url), length(url)) == "/") {
private$url <- substr(url, 1, length(url)-1)
if(substr(url, nchar(url), nchar(url)) == "/") {
private$url <- substr(url, 1, nchar(url)-1)
} else {
private$url <- url
}
Expand Down

0 comments on commit 559cef3

Please sign in to comment.