Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed problem where path was escaped multiple times #33

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ihuk
Copy link

@ihuk ihuk commented Jan 14, 2016

This pull requests fixes problem where create directory and upload requests would not work if path contained characters that need escaping.

Problem is in the code below that uses self.path which is already escaped to set up listing request which escapes is for the second time:

self.listrequest = [[GRListingRequest alloc] initWithDelegate:self datasource:self];
self.listrequest.path = [self.path stringByDeletingLastPathComponent];

@xfally
Copy link

xfally commented May 31, 2016

+1 for this issue. I also noticed #27 had reported it ago.

When I debug my App, the same error 'File or directory not available or directory already exists.' is thrown. Then I located the bug at the same codes, but fix it by another way:

self.listingRequest.path = [[self.path stringByDeletingLastPathComponent] stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];

Just take it back to UTF-8 without escapes, so no other codes need modified.

xfally pushed a commit to xfally/cordova-plugin-ftp that referenced this pull request May 31, 2016
xfally pushed a commit to xfally/cordova-plugin-ftp that referenced this pull request Jun 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants