Skip to content

Commit

Permalink
add the / to the key if necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
duncantl committed May 18, 2019
1 parent 7e10880 commit 8eee0e2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Rqpdf/R/info.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ function(file, key)
file = path.expand(file)
if(!file.exists(file))
stop("no such file ", file)

# keys start with a / and if we omit this we get NA back.
# So we add it for the caller if it is not there.
if(!grepl("^/", key))
key = paste0("/", key)

.Call("R_get_pdf_info_val", file, as.character(key))
}
Expand Down

0 comments on commit 8eee0e2

Please sign in to comment.