cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dblotsky <>
Subject [GitHub] cordova-plugin-file-transfer pull request: CB-8641 Some file-trans...
Date Wed, 02 Dec 2015 18:35:40 GMT
Github user dblotsky commented on a diff in the pull request:
    --- Diff: src/windows/FileTransferProxy.js ---
    @@ -49,6 +49,17 @@ function nativePathToCordova(path) {
         return String(path).replace(/\\/g, '/');
    +function alreadyCancelled(opId, errorCb, filePath, server) {
    +    var op = fileTransferOps[opId];
    +    if (op && op.state === FileTransferOperation.CANCELLED) {
    +        // Here we should call errorCB with ABORT_ERR error
    +        errorCb(new FTErr(FTErr.ABORT_ERR, nativePathToCordova(filePath), server));
    --- End diff --
    This side effect should not be part of the function. Please place it outside, into the
calling code. It will be duplicated, but that is still somewhat OK; it's definitely better
than someone calling if `alreadyCancelled()` twice in a row and getting their callback called

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 or file a JIRA ticket
with INFRA.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message