incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tim...@apache.org
Subject [1/48] js commit: Fixed copying dirs to root
Date Thu, 07 Jun 2012 20:40:43 GMT
Updated Branches:
  refs/heads/master 5f70310f4 -> cdc172b21


Fixed copying dirs to root


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

Branch: refs/heads/master
Commit: cabb20912a7403c32cf2dd9728419875aad7e83a
Parents: 86986eb
Author: Tim Kim <tim.kim@nitobi.com>
Authored: Mon Jun 4 16:44:07 2012 -0700
Committer: Tim Kim <tim.kim@nitobi.com>
Committed: Thu Jun 7 13:40:24 2012 -0700

----------------------------------------------------------------------
 lib/playbook/plugin/playbook/Entry.js |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/cabb2091/lib/playbook/plugin/playbook/Entry.js
----------------------------------------------------------------------
diff --git a/lib/playbook/plugin/playbook/Entry.js b/lib/playbook/plugin/playbook/Entry.js
index a9d90ae..cdce36b 100644
--- a/lib/playbook/plugin/playbook/Entry.js
+++ b/lib/playbook/plugin/playbook/Entry.js
@@ -245,7 +245,8 @@ module.exports = {
             }
         }else{
             if(srcPath != dstPath){
-                if(dstPath.indexOf(srcPath)>=0 || blackberry.io.file.exists(dstPath)){
+                // allow back up to the root but not child dirs
+                if((parent.name != "root" && dstPath.indexOf(srcPath)>=0) || blackberry.io.file.exists(dstPath)){
                     // copying directory into child or is file path
                     fail(FileError.INVALID_MODIFICATION_ERR);
                 }else{


Mime
View raw message