GoldRaccoon icon indicating copy to clipboard operation
GoldRaccoon copied to clipboard

Fixed problem where path was escaped multiple times

Open ihuk opened this issue 9 years ago • 1 comments

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];

ihuk avatar Jan 14 '16 14:01 ihuk

+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 avatar May 31 '16 06:05 xfally