Skip to content

Commit 11027e2

Browse files
committed
Invoke missing path escaping for FTP paths.
1 parent bf43b27 commit 11027e2

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/Adapter/Ftp.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -563,11 +563,10 @@ protected function ftpRawlist($options, $path)
563563
$connection = $this->getConnection();
564564

565565
if ($this->isPureFtpd) {
566-
$path = str_replace(' ', '\ ', $path);
567-
$this->escapePath($path);
566+
$path = str_replace([' ', '[', ']'], ['\ ', '\\[', '\\]'], $path);
568567
}
569568

570-
return ftp_rawlist($connection, $options . ' ' . $path);
569+
return ftp_rawlist($connection, $options . ' ' . $this->escapePath($path));
571570
}
572571

573572
private function getRawExecResponseCode($command)

0 commit comments

Comments
 (0)