harishanchu / Laravel-FTP

A simple Laravel 4/5/6/7 ftp service provider with basic ftp methods.
220 stars 87 forks source link

Detailed listing for Windows servers fails #42

Open padarom opened 8 years ago

padarom commented 8 years ago

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