I though about using fs::path_norm()
-- which does interpret "../"
, but it eliminates the second /
in http://
.
base_url <- "https://<domain>.com/first/second"
ref <- "../file.ext"
library(fs)
p <- path(base_url, ref)
path_norm(p)
# https:/<domain>.com/first/file.ext
Any ideas?