src build elFinder-2.1-69d68ac

This commit is contained in:
nao-pon
2017-06-02 15:46:25 +09:00
parent 93cb1271a6
commit 7d381dadbe
6 changed files with 43 additions and 29 deletions
+3 -3
View File
@@ -1005,7 +1005,7 @@ class elFinderVolumeLocalFileSystem extends elFinderVolumeDriver {
if ($this->quarantine) {
$dir = $this->quarantine.DIRECTORY_SEPARATOR.md5(basename($path).mt_rand());
$archive = $dir.DIRECTORY_SEPARATOR.basename($path);
$archive = (isset($arc['toSpec']) || $arc['cmd'] === 'phpfunction')? '' : $dir.DIRECTORY_SEPARATOR.basename($path);
if (!mkdir($dir)) {
return false;
@@ -1017,12 +1017,12 @@ class elFinderVolumeLocalFileSystem extends elFinderVolumeDriver {
chmod($dir, 0777);
// copy in quarantine
if (!copy($path, $archive)) {
if (!is_readable($path) || ($archive && !copy($path, $archive))) {
return false;
}
// extract in quarantine
$this->unpackArchive($archive, $arc);
$this->unpackArchive($path, $arc, $archive? true : $dir);
// get files list
$ls = self::localScandir($dir);