Laravel-FTP icon indicating copy to clipboard operation
Laravel-FTP copied to clipboard

Detailed listing for Windows servers fails

Open padarom opened this issue 8 years ago • 0 comments

The FTP class blindly assumes that the server it's connected to supports Unix style directory listing. This is not the case for non-configured Windows FTP servers. ftp_rawlist returns a list like this:

[
    "05-30-16  14:00       <DIR>          Network",
    "05-30-16  14:30                   52 File.txt",
    "05-30-16  16:29       <DIR>          Temp",
    "05-30-16  16:29       <DIR>          Windows"
]

Here the result from ftp_rawlist is split by a number of spaces and then the list construct is used to extract the results into a variable. With Windows-style directory listings, this results in an Undefined Offset: 4

padarom avatar May 31 '16 07:05 padarom