mirror of
https://github.com/Studio-42/elFinder
synced 2026-06-08 12:37:09 +00:00
src build elFinder-2.1-69d68ac
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user