ftp: minor optimization in dir() (#8518)
parent
9f662002da
commit
91af2418de
|
@ -221,8 +221,7 @@ pub fn (mut zftp FTP) dir() ?[]string {
|
||||||
sdir := list_dir.bytestr()
|
sdir := list_dir.bytestr()
|
||||||
for lfile in sdir.split('\n') {
|
for lfile in sdir.split('\n') {
|
||||||
if lfile.len > 1 {
|
if lfile.len > 1 {
|
||||||
spl := lfile.split(' ')
|
dir << lfile.after(' ').trim_space()
|
||||||
dir << spl[spl.len - 1].trim_space()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return dir
|
return dir
|
||||||
|
|
Loading…
Reference in New Issue