CB-7416 Fixes file path reference when adding new source file

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

Branch: refs/heads/master
Commit: 4b3b55dc722f95c5edc7b51ece4d8d7ba5823f8f
Parents: 241a786
Author: sgrebnov <v-seg...@microsoft.com>
Authored: Thu Aug 28 13:05:50 2014 +0400
Committer: Anis Kadri <a...@apache.org>
Committed: Fri Sep 5 11:12:19 2014 -0700

----------------------------------------------------------------------
 cordova-lib/src/plugman/platforms/windows.js | 2 +-
 cordova-lib/src/util/windows/jsproj.js       | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/4b3b55dc/cordova-lib/src/plugman/platforms/windows.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/platforms/windows.js 
b/cordova-lib/src/plugman/platforms/windows.js
index c8e1511..dc5089f 100644
--- a/cordova-lib/src/plugman/platforms/windows.js
+++ b/cordova-lib/src/plugman/platforms/windows.js
@@ -69,7 +69,7 @@ module.exports = {
         },
         uninstall:function(source_el, project_dir, plugin_id, project_file) {
             var dest = path.join('www', 'plugins', plugin_id,
-                                 source_el.attrib['target-dir'] ? 
source_el.attrib['target-dir'] : '',
+                                 source_el.attrib['target-dir'] || '',
                                  path.basename(source_el.attrib['src']));
             common.removeFile(project_dir, dest);
             // remove reference to this file from csproj.

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/4b3b55dc/cordova-lib/src/util/windows/jsproj.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/util/windows/jsproj.js 
b/cordova-lib/src/util/windows/jsproj.js
index d847603..a20fe7f 100644
--- a/cordova-lib/src/util/windows/jsproj.js
+++ b/cordova-lib/src/util/windows/jsproj.js
@@ -131,10 +131,10 @@ jsproj.prototype = {
         }
         // make ItemGroup to hold file.
         var item = new et.Element('ItemGroup');
-
+        var me = this;
         relative_path.forEach(function(filePath) {
             filePath = filePath.split('/').join('\\');
-            filePath = this.isUniversalWindowsApp ? 
'$(MSBuildThisFileDirectory)' + filePath : filePath;
+            filePath = me.isUniversalWindowsApp ? 
'$(MSBuildThisFileDirectory)' + filePath : filePath;
 
             var content = new et.Element('Content');
             content.attrib.Include = filePath;

Reply via email to