Skip to content

Commit

Permalink
dealing with issue #52
Browse files Browse the repository at this point in the history
  • Loading branch information
Luke Winslow committed Dec 30, 2015
1 parent a963c0d commit 1482199
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion R/item_file_download.R
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ item_file_download = function(id, ..., names, destinations, dest_dir, session=cu
destinations = file.path(dest_dir, names)

#or we have names and destinations
}else{
}else if(!missing(names) & !missing(destinations)){
if(length(names) != length(destinations)){
stop('Length of names and destinations must be identical')
}
Expand All @@ -62,6 +62,9 @@ item_file_download = function(id, ..., names, destinations, dest_dir, session=cu
if(!all(names %in% flist$fname)){
stop('Item does not contain all requested files')
}
#otherwise in some other error condition
}else{
stop('Must have either names & destinations, or dest_dir for all files')
}


Expand Down

0 comments on commit 1482199

Please sign in to comment.