Skip to content

Commit

Permalink
added exist check for .exe under windows
Browse files Browse the repository at this point in the history
  • Loading branch information
16EAGLE committed Sep 5, 2018
1 parent 6a5ee46 commit 3ce28f1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions R/animate_move.R
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,9 @@ animate_move <- function(m, out_dir, conv_dir = "",
if(!isTRUE(is.character(conv_dir))){
out("Argument 'conv_dir' needs to be a character object.",type=3)
}else{
if(length(unlist(sapply(conv_dir, function(x) grep(".exe", x), USE.NAMES = F))) > 0){
cd.exists <- sapply(conv_dir, file.exists, USE.NAMES = F)
if(!all(cd.exists)) out(paste0("File '", paste0(conv_dir[!cd.exists], collapse = ", "), " does not exist."), type = 3)
if(conv_dir[1] == ""){
conv_dir <- get_libraries()
if(length(conv_dir) == 0) out("Could not detect 'convert', 'ffmpeg' or 'avconv' on your system. Please use the argument 'conv_dir' to specify the command path to 'convert', 'ffmpeg' or 'avconv' manually.", type = 3)
Expand Down

0 comments on commit 3ce28f1

Please sign in to comment.