You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by be...@apache.org on 2013/06/27 23:38:34 UTC

git commit: Fixed 'Maximum call stack size exceeded' error when calling isCordova on windows root dir

Updated Branches:
  refs/heads/master2 8ce3a4a83 -> a0966a2c1


Fixed 'Maximum call stack size exceeded' error when calling isCordova on windows root dir


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

Branch: refs/heads/master2
Commit: a0966a2c1525b50a6fb155b8e0bdfe4a4044b962
Parents: 8ce3a4a
Author: Benn Mapes <be...@gmail.com>
Authored: Thu Jun 27 14:36:35 2013 -0700
Committer: Benn Mapes <be...@gmail.com>
Committed: Thu Jun 27 14:36:35 2013 -0700

----------------------------------------------------------------------
 src/util.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/a0966a2c/src/util.js
----------------------------------------------------------------------
diff --git a/src/util.js b/src/util.js
index e860776..7ae9dfe 100644
--- a/src/util.js
+++ b/src/util.js
@@ -34,8 +34,9 @@ module.exports = {
     // Runs up the directory chain looking for a .cordova directory.
     // IF it is found we are in a Cordova project.
     // If not.. we're not. HOME directory doesnt count.
+    // HOMEDRIVE is used to catch when we've backed up to the root drive in windows (i.e C:\)
     isCordova: function isCordova(dir) {
-        if (dir) {
+        if (dir && dir != process.env['HOMEDRIVE'] + path.sep) {
             if (dir == HOME) {
                 return false;
             } else {