Skip to content

Commit

Permalink
[VD:FTP] fix Studio-42#3172 to support filename starting with " "
Browse files Browse the repository at this point in the history
  • Loading branch information
nao-pon committed Jun 1, 2020
1 parent 04720e4 commit 901f01f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions php/elFinderVolumeFTP.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,10 @@ protected function parseRaw($raw, $base, $nameOnly = false)
$lastyear = date('Y') - 1;
}

$info = preg_split("/\s+/", $raw, 9);
$info = preg_split("/\s+/", $raw, 8);
if (isset($info[7])) {
list($info[7], $info[8]) = explode(' ', $info[7], 2);
}
$stat = array();

if (!isset($this->ftpOsUnix)) {
Expand All @@ -398,9 +401,6 @@ protected function parseRaw($raw, $base, $nameOnly = false)
return false;
}

if ($info[8] === '') {
$info[8] = preg_replace('/^.+?\s(\s*)$/', '$1', $raw);
}
$name = $info[8];

if (preg_match('|(.+)\-\>(.+)|', $name, $m)) {
Expand Down

0 comments on commit 901f01f

Please sign in to comment.