Permalink
Browse files

Avoid file.exists() to detect if directory exists.

  • Loading branch information...
1 parent 5fb8843 commit d0e3b2355a6d799dbce1e65703c294bb8b294fab @jalvesaq committed Oct 6, 2012
Showing with 1 addition and 12 deletions.
  1. +1 −12 R/vimbol.R
View
@@ -133,18 +133,7 @@ vim.bol <- function(omnilist, packlist, allnames = FALSE) {
cat("Building files with lists of objects in loaded packages for omni completion and Object Browser...\n")
- if(file.exists(omnilist)){
- if(file.info(omnilist)$isdir == FALSE){
- msg <- paste('"', omnilist, '" exists but is not a directory.',
- sep = "")
- stop(msg)
- }
- } else {
- if(!dir.create(omnilist)){
- msg <- paste("Could not create directory: ", omnilist)
- stop(msg)
- }
- }
+ dir.create(omnilist, showWarnings = FALSE)
loadpack <- search()
if(missing(packlist))

0 comments on commit d0e3b23

Please sign in to comment.