You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by om...@apache.org on 2016/04/22 04:27:29 UTC

[2/2] cordova-medic git commit: CB-11135 If folder is pre-existent, don't error out

CB-11135 If folder is pre-existent, don't error out

 This closes #98


Project: http://git-wip-us.apache.org/repos/asf/cordova-medic/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-medic/commit/bf99e197
Tree: http://git-wip-us.apache.org/repos/asf/cordova-medic/tree/bf99e197
Diff: http://git-wip-us.apache.org/repos/asf/cordova-medic/diff/bf99e197

Branch: refs/heads/master
Commit: bf99e19777f6f7b93fc03f9490aa36eca2bc77e2
Parents: b82a1ee
Author: Omar Mefire <om...@gmail.com>
Authored: Thu Apr 21 18:53:39 2016 -0700
Committer: Omar Mefire <om...@gmail.com>
Committed: Thu Apr 21 19:21:24 2016 -0700

----------------------------------------------------------------------
 lib/medicIOSPermissions.js | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-medic/blob/bf99e197/lib/medicIOSPermissions.js
----------------------------------------------------------------------
diff --git a/lib/medicIOSPermissions.js b/lib/medicIOSPermissions.js
index 573f2fd..40c1a28 100644
--- a/lib/medicIOSPermissions.js
+++ b/lib/medicIOSPermissions.js
@@ -5,6 +5,7 @@ var path     = require('path');
 var fs       = require('fs');
 var shelljs  = require("shelljs");
 var util     = require('./util');
+var mkdirp   = require('mkdirp');
 
 var TCC_FOLDER_PERMISSION = 0777;
 
@@ -23,7 +24,9 @@ MedicIOSPermissions.prototype.updatePermissions = function(serviceList){
         // No TCC.db file exists by default. So, Copy the new TCC.db file
         var destinationTCCFolder = path.join(simulatorsFolder, simId, '/data/Library/TCC');
         if(!util.doesFileExist(destinationTCCFolder)){
-            fs.mkdir(destinationTCCFolder, TCC_FOLDER_PERMISSION);
+            mkdirp(destinationTCCFolder, {
+                mode: TCC_FOLDER_PERMISSION
+            });
         }
         var command = "cp " + this.tccDbPath + " " + destinationTCCFolder;
         util.medicLog("Running Command: " + command);


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org