Commit 310bac9c authored by Felix Paul Kühne's avatar Felix Paul Kühne

Local Network: simplify FTP path creation and use passive mode for communication

parent bf112281
......@@ -211,11 +211,7 @@
}
} else if (_serverType == kVLCFTPServer) {
if ([[_objectList[indexPath.row] objectForKey:(id)kCFFTPResourceType] intValue] == 4) {
NSString *newPath;
if ([_ftpServerPath hasSuffix:@"/"])
newPath = [NSString stringWithFormat:@"%@%@", _ftpServerPath, [_objectList[indexPath.row] objectForKey:(id)kCFFTPResourceName]];
else
newPath = [NSString stringWithFormat:@"%@/%@", _ftpServerPath, [_objectList[indexPath.row] objectForKey:(id)kCFFTPResourceName]];
NSString *newPath = [NSString stringWithFormat:@"%@/%@", _ftpServerPath, [_objectList[indexPath.row] objectForKey:(id)kCFFTPResourceName]];
VLCLocalServerFolderListViewController *targetViewController = [[VLCLocalServerFolderListViewController alloc] initWithFTPServer:_ftpServerAddress userName:_ftpServerUserName andPassword:_ftpServerPassword atPath:newPath];
[self.navigationController pushViewController:targetViewController animated:YES];
......@@ -237,6 +233,7 @@
_listDirRequest.username = _ftpServerUserName;
_listDirRequest.password = _ftpServerPassword;
_listDirRequest.path = _ftpServerPath;
_listDirRequest.passive = YES;
[_listDirRequest start];
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment