Permalink
Browse files

mkdir: ignore if target exists

  • Loading branch information...
1 parent 47b9988 commit 79e2b57f5de750e5cd9bb19a3aabe6abfd31c721 @tommy351 committed Sep 4, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/qfs.js
View
@@ -403,6 +403,8 @@ utils.each({
var _this = this,
parent = this.parent();
+ if (this.children(name).length) return true;
+
fn.push(function(next){
parent.exists(function(exist){
if (exist){
@@ -422,6 +424,8 @@ utils.each({
},
function(name){
this.each(function(){
+ if (this.children(name).length) return true;
+
var parent = this.parent();
if (!parent.exists()){

0 comments on commit 79e2b57

Please sign in to comment.