[GitHub] cordova-plugin-file-transfer pull request #175: CB-10696 iOS: Encode target ...

2017-04-06 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/cordova-plugin-file-transfer/pull/175


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

-
To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org
For additional commands, e-mail: dev-h...@cordova.apache.org



[GitHub] cordova-plugin-file-transfer pull request #175: CB-10696 iOS: Encode target ...

2017-04-06 Thread matrosov-nikita
Github user matrosov-nikita commented on a diff in the pull request:


https://github.com/apache/cordova-plugin-file-transfer/pull/175#discussion_r110163497
  
--- Diff: src/ios/CDVFileTransfer.m ---
@@ -440,13 +440,23 @@ - (void)download:(CDVInvokedUrlCommand*)command
 targetURL = [[self.commandDelegate getCommandInstance:@"File"] 
fileSystemURLforLocalPath:target].url;
 } else {
 targetURL = [NSURL URLWithString:target];
+
+if (targetURL == nil) {
+NSString* targetUrlTextEscaped = [target 
stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
--- End diff --

@blankg, thanks, updated


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

-
To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org
For additional commands, e-mail: dev-h...@cordova.apache.org



[GitHub] cordova-plugin-file-transfer pull request #175: CB-10696 iOS: Encode target ...

2017-03-01 Thread blankg
Github user blankg commented on a diff in the pull request:


https://github.com/apache/cordova-plugin-file-transfer/pull/175#discussion_r103760457
  
--- Diff: src/ios/CDVFileTransfer.m ---
@@ -440,13 +440,23 @@ - (void)download:(CDVInvokedUrlCommand*)command
 targetURL = [[self.commandDelegate getCommandInstance:@"File"] 
fileSystemURLforLocalPath:target].url;
 } else {
 targetURL = [NSURL URLWithString:target];
+
+if (targetURL == nil) {
+NSString* targetUrlTextEscaped = [target 
stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
--- End diff --

stringByAddingPercentEscapesUsingEncoding is deprecated, would be better to 
use [target stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet 
URLFragmentAllowedCharacterSet]]


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

-
To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org
For additional commands, e-mail: dev-h...@cordova.apache.org



[GitHub] cordova-plugin-file-transfer pull request #175: CB-10696 iOS: Encode target ...

2017-02-01 Thread matrosov-nikita
GitHub user matrosov-nikita opened a pull request:

https://github.com/apache/cordova-plugin-file-transfer/pull/175

CB-10696 iOS: Encode target path with spaces



### Platforms affected
iOS

### What does this PR do?
Encodes target path for downloading process

### What testing has been done on this change?
Auto-test

### Checklist
- [x] [Reported an issue](http://cordova.apache.org/contribute/issues.html) 
in the JIRA database
- [x] Commit message follows the format: "CB-3232: (android) Fix bug with 
resolving file paths", where CB- is the JIRA ID & "android" is the platform 
affected.
- [x] Added automated test coverage as appropriate for this change.


You can merge this pull request into a Git repository by running:

$ git pull https://github.com/matrosov-nikita/cordova-plugin-file-transfer 
encode-target-path

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/cordova-plugin-file-transfer/pull/175.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #175


commit 7c32fcb6b9937fb6e97f50790493cb532cbd6ad4
Author: Nikita Matrosov 
Date:   2017-02-01T10:28:06Z

CB-10696 iOS: Encode target path with spaces




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

-
To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org
For additional commands, e-mail: dev-h...@cordova.apache.org