1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

Fix bug #46295 - Be less strict with FTP daemons when getting directory filelists.

Authorised by: bantu ;-)

git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9820 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Andreas Fischer
2009-07-22 01:26:09 +00:00
parent 2bb2e4a43b
commit 81e67fbef1
2 changed files with 9 additions and 0 deletions

View File

@@ -462,6 +462,14 @@ class ftp extends transfer
{
$list = @ftp_nlist($this->connection, $dir);
// See bug #46295 - Some FTP daemons don't like './'
if ($dir === './')
{
// Let's try some alternatives
$list = (empty($list)) ? @ftp_nlist($this->connection, '.') : $list;
$list = (empty($list)) ? @ftp_nlist($this->connection, '') : $list;
}
// Return on error
if ($list === false)
{