You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ia...@apache.org on 2014/10/07 13:57:55 UTC

[2/3] git commit: CB-7715 Fix windows build if folder has '.(js|htm|etc)' in name

CB-7715 Fix windows build if folder has '.(js|htm|etc)' in name

This closes #99


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

Branch: refs/heads/master
Commit: c08e8d2c85309c58aa672388dbc7579d897eebed
Parents: d62bf52
Author: sgrebnov <v-...@microsoft.com>
Authored: Mon Oct 6 13:05:39 2014 +0400
Committer: Ian Clelland <ic...@chromium.org>
Committed: Tue Oct 7 07:29:59 2014 -0400

----------------------------------------------------------------------
 cordova-lib/src/cordova/metadata/windows_parser.js | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/c08e8d2c/cordova-lib/src/cordova/metadata/windows_parser.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/cordova/metadata/windows_parser.js b/cordova-lib/src/cordova/metadata/windows_parser.js
index a18c19b..a5ae98a 100644
--- a/cordova-lib/src/cordova/metadata/windows_parser.js
+++ b/cordova-lib/src/cordova/metadata/windows_parser.js
@@ -270,11 +270,16 @@ module.exports.prototype = {
         var files = shell.ls('-R', www);
 
         files.forEach(function (file) {
-            if (!file.match(/\.(js|html|css|json)/)) {
+            if (!file.match(/\.(js|html|css|json)$/i)) {
                 return;
             }
 
             var filePath = path.join(www, file);
+            // skip if this is a folder
+            if (!fs.lstatSync(filePath).isFile()) {
+                return;
+            }
+
             var content = fs.readFileSync(filePath);
 
             if (content[0] !== 0xEF && content[1] !== 0xBE && content[2] !== 0xBB) {


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