Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/ios/CDVFile.m
Original file line number Diff line number Diff line change
Expand Up @@ -586,8 +586,8 @@ - (void)resolveLocalFileSystemURI:(CDVInvokedUrlCommand*)command
//encode path with percent escapes
-(NSString *)encodePath:(NSString *)path
{
NSString *decodedPath = [path stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; //decode incase it's already encoded to avoid encoding twice
return [decodedPath stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
NSString *decodedPath = [path stringByRemovingPercentEncoding:NSUTF8StringEncoding]; //decode incase it's already encoded to avoid encoding twice
return [decodedPath stringByAddingPercentEncodingWithAllowedCharacters:NSUTF8StringEncoding];
}


Expand Down
2 changes: 1 addition & 1 deletion src/ios/CDVLocalFilesystem.m
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ - (NSString *)filesystemPathForURL:(CDVFilesystemURL *)url
- (CDVFilesystemURL *)URLforFullPath:(NSString *)fullPath
{
if (fullPath) {
NSString* escapedPath = [fullPath stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
NSString* escapedPath = [fullPath stringByAddingPercentEncodingWithAllowedCharacters:NSUTF8StringEncoding];
if ([fullPath hasPrefix:@"/"]) {
return [CDVFilesystemURL fileSystemURLWithString:[NSString stringWithFormat:@"%@://localhost/%@%@", kCDVFilesystemURLPrefix, self.name, escapedPath]];
}
Expand Down