Permalink
Browse files

Don't make output folder if it already exists

  • Loading branch information...
1 parent 002bc17 commit 38102d371412050919ca12f392ff67b8969d8e06 Daniel Freedman committed Mar 27, 2011
Showing with 3 additions and 1 deletion.
  1. +3 −1 jodoc.js
View
@@ -116,7 +116,9 @@ function main() {
template = fs.readFileSync(options.template,"utf8").toString();
}
if (options.output) {
- fs.mkdirSync(options.output,0777);
+ if (!path.existsSync(options.output)) {
+ fs.mkdirSync(options.output,0777);
+ }
if (!options.noindex) {
linked_files.push({name:"_index.html",content:index});
}

0 comments on commit 38102d3

Please sign in to comment.