CB-12337 Resolve symbolic links in project root If project path had symlinks its absolute value was different from that returned by __dirname inside project-local modules. So when it was joined with various dirs like 'www' the two absolute paths were merged resulting in an invalid path.
This should make 'cordova emulate android' work on Windows for projects with symlinks in path. There may be other places where similar measures need to be taken. This closes #514 Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/e62852c3 Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/e62852c3 Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/e62852c3 Branch: refs/heads/common-2.0.x Commit: e62852c30a61899aa102ccf016984eed0f15244c Parents: fd6b9dd Author: Sergey Zolotarev <sr...@yandex.com> Authored: Tue Jan 10 01:51:57 2017 +0600 Committer: Steve Gill <stevengil...@gmail.com> Committed: Thu Mar 23 23:06:27 2017 -0700 ---------------------------------------------------------------------- cordova-lib/src/cordova/util.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/e62852c3/cordova-lib/src/cordova/util.js ---------------------------------------------------------------------- diff --git a/cordova-lib/src/cordova/util.js b/cordova-lib/src/cordova/util.js index 0596c4b..67552c8 100644 --- a/cordova-lib/src/cordova/util.js +++ b/cordova-lib/src/cordova/util.js @@ -135,7 +135,7 @@ function isCordova(dir) { // Cd to project root dir and return its path. Throw CordovaError if not in a Corodva project. function cdProjectRoot() { - var projectRoot = this.isCordova(); + var projectRoot = convertToRealPathSafe(this.isCordova()); if (!projectRoot) { throw new CordovaError('Current working directory is not a Cordova-based project.'); } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org For additional commands, e-mail: commits-h...@cordova.apache.org