cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agrieve <...@git.apache.org>
Subject [GitHub] cordova-app-harness pull request: [CB6947] move app directory by d...
Date Tue, 17 Jun 2014 01:51:00 GMT
Github user agrieve commented on a diff in the pull request:

    https://github.com/apache/cordova-app-harness/pull/1#discussion_r13839802
  
    --- Diff: www/cdvah/js/HarnessServer.js ---
    @@ -272,15 +278,30 @@
                         app.updatingStatus = unzipPercentage;
                     })
                     .then(function(zipAssetManifest) {
    -                    var keys = Object.keys(zipAssetManifest);
    -                    return $q.when()
    -                    .then(function next() {
    -                        var k = keys.shift();
    -                        if (k) {
    -                            return importFile(tmpDirUrl + k, zipAssetManifest[k]['path'],
app, zipAssetManifest[k]['etag'])
    -                            .then(next);
    -                        }
    -                    });
    +                    if (movetype == 'bulk') {
    +                        console.log('Moving files in bulk');
    +                        return $q.when()
    +                        .then(function(){
    +                            // get the source base path from the first file
    +                            // all files need to be in the same place
    +                            var firstfile = Object.keys(zipAssetManifest)[0];
    +                            var fpath = tmpDirUrl + firstfile;
    +                            var pathendposition = fpath.lastIndexOf(zipAssetManifest[firstfile]['path']);
    +                            var fromurl = fpath.substr(0,pathendposition-1);
    +                            return app.directoryManager.bulkAddFile(zipAssetManifest,
fromurl, tmpDirUrl);
    --- End diff --
    
    bulkAddFile takes only 2 parameters. 
    I think fromurl == tmpDirUrl


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message