1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

ftp: minor optimization in dir() (#8518)

This commit is contained in:
yuyi 2021-02-03 01:51:55 +08:00 committed by GitHub
parent 9f662002da
commit 91af2418de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -221,8 +221,7 @@ pub fn (mut zftp FTP) dir() ?[]string {
sdir := list_dir.bytestr()
for lfile in sdir.split('\n') {
if lfile.len > 1 {
spl := lfile.split(' ')
dir << spl[spl.len - 1].trim_space()
dir << lfile.after(' ').trim_space()
}
}
return dir