Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Create img dir if it doesn't yet exist.

  • Loading branch information...
commit 6fd4563a7e614092e2ac18e106ae550e90fc528c 1 parent 58dbfaf
@trestletech authored
Showing with 4 additions and 0 deletions.
  1. +1 −0  .gitignore
  2. +3 −0  rgl/webGLParser.R
View
1  .gitignore
@@ -1,3 +1,4 @@
.Rproj.user
.Rhistory
.RData
+rgl/www/img/
View
3  rgl/webGLParser.R
@@ -17,6 +17,9 @@ extractWebGL <- function(wwwDir="www", imgDir="img/"){
#sub out the snapshot reference for a file with a unique ID
lines <- gsub("snapshot.png", paste(imgDir, id, ".png", sep=""), lines)
+ #create the img dir if it doesn't yet exist.
+ dir.create(paste(wwwDir, "/", imgDir, sep=""))
+
#copy the snapshot image to a public WWW dir
file.copy(paste(tempDir, "snapshot.png", sep=""), paste(wwwDir, "/", imgDir, id, ".png", sep=""))
Please sign in to comment.
Something went wrong with that request. Please try again.