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

git commit: attempt at fixing cb-3429

Updated Branches:
  refs/heads/cb-3429 [created] 2edeff211


attempt at fixing cb-3429


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

Branch: refs/heads/cb-3429
Commit: 2edeff211416e2060566bf76bdd47e6a64ad95ed
Parents: 7b63c0b
Author: Fil Maj <ma...@gmail.com>
Authored: Fri May 17 21:38:23 2013 -0700
Committer: Fil Maj <ma...@gmail.com>
Committed: Fri May 17 21:38:23 2013 -0700

----------------------------------------------------------------------
 src/platforms/ios.js |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/2edeff21/src/platforms/ios.js
----------------------------------------------------------------------
diff --git a/src/platforms/ios.js b/src/platforms/ios.js
index 827ae68..87616ec 100644
--- a/src/platforms/ios.js
+++ b/src/platforms/ios.js
@@ -42,12 +42,13 @@ module.exports = {
 
             if (!fs.existsSync(srcFile)) throw new Error('cannot find "' + srcFile + '" ios <source-file>');
             if (fs.existsSync(destFile)) throw new Error('target destination "' + destFile + '" already exists');
-            var project_ref = path.join('Plugins', path.relative(project.plugins_dir, destFile));
-            project.xcode.addSourceFile(project_ref);
+            var relative_within_project = path.relative(project.plugins_dir, destFile);
+            var relative_on_filesystem = path.join('Plugins', relative_within_project);
+            project.xcode.addSourceFile(relative_on_filesystem);
             if (is_framework) {
                 var weak = source_el.attrib['weak'];
                 var opt = { weak: (weak == undefined || weak == null || weak != 'true' ? false : true ) };
-                project.xcode.addFramework(project_ref, opt);
+                project.xcode.addFramework(relative_within_project, opt);
             }
             shell.mkdir('-p', targetDir);
             shell.cp(srcFile, destFile);
@@ -58,10 +59,11 @@ module.exports = {
             var destFile = path.resolve(targetDir, path.basename(src));
             var is_framework = source_el.attrib['framework'] && (source_el.attrib['framework'] == 'true' || source_el.attrib['framework'] == true);
 
-            var project_ref = path.join('Plugins', path.relative(project.plugins_dir, destFile));
-            project.xcode.removeSourceFile(project_ref);
+            var relative_within_project = path.relative(project.plugins_dir, destFile);
+            var relative_on_filesystem = path.join('Plugins', relative_within_project);
+            project.xcode.removeSourceFile(relative_on_filesystem);
             if (is_framework) {
-                project.xcode.removeFramework(project_ref);
+                project.xcode.removeFramework(relative_within_project);
             }
             shell.rm('-rf', destFile);