ftp: fix error in dir() (#8504)
							parent
							
								
									9a2820fa7b
								
							
						
					
					
						commit
						5ec6f7a781
					
				|  | @ -67,7 +67,9 @@ mut: | |||
| } | ||||
| 
 | ||||
| pub fn new() FTP { | ||||
| 	mut f := FTP{ conn: 0 } | ||||
| 	mut f := FTP{ | ||||
| 		conn: 0 | ||||
| 	} | ||||
| 	f.buffer_size = 1024 | ||||
| 	return f | ||||
| } | ||||
|  | @ -220,7 +222,7 @@ pub fn (mut zftp FTP) dir() ?[]string { | |||
| 	for lfile in sdir.split('\n') { | ||||
| 		if lfile.len > 1 { | ||||
| 			spl := lfile.split(' ') | ||||
| 			dir << spl[spl.len - 1] | ||||
| 			dir << spl[spl.len - 1].trim_space() | ||||
| 		} | ||||
| 	} | ||||
| 	return dir | ||||
|  |  | |||
|  | @ -41,6 +41,7 @@ fn ftp_client_test_inside() ? { | |||
| 		return | ||||
| 	} | ||||
| 	assert dir_list2.len > 0 | ||||
| 	assert dir_list2.contains('katello-host-tools-3.3.5-8.sles11_4sat.src.rpm') | ||||
| 	blob := zftp.get('katello-host-tools-3.3.5-8.sles11_4sat.src.rpm') or { | ||||
| 		assert false | ||||
| 		return | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue