Skip to content

Commit

Permalink
revert edits, original code worked perfect
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisMuir committed May 11, 2018
1 parent 2fbfa8b commit 7ad518f
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions R/read_docs.r
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,9 @@ read_docx <- function(path) {
httr::stop_for_status(res)
} else {
path <- path.expand(path)
if (!file.exists(path)) stop(sprintf("Cannot find '%s'", path), call.=FALSE)
# copy docx to zip (not entirely necessary)
file_copy <- file.copy(path, tmpf)
if (!file_copy) {
stop(sprintf("Cannot find '%s'", path), call.=FALSE)
}
file.copy(path, tmpf)
}
# unzip it
unzip(tmpf, exdir=sprintf("%s/docdata", tmpd))
Expand Down

0 comments on commit 7ad518f

Please sign in to comment.