mirror of
https://github.com/Studio-42/elFinder
synced 2026-06-08 12:37:09 +00:00
Merge branch '2.x' into 2.1
This commit is contained in:
@@ -539,14 +539,10 @@ class elFinderVolumeLocalFileSystem extends elFinderVolumeDriver {
|
||||
protected function _save($fp, $dir, $name, $stat) {
|
||||
$path = $dir.DIRECTORY_SEPARATOR.$name;
|
||||
|
||||
if (!($target = @fopen($path, 'wb'))) {
|
||||
if (@file_put_contents($path, $fp, LOCK_EX) === false) {
|
||||
return false;
|
||||
}
|
||||
|
||||
while (!feof($fp)) {
|
||||
fwrite($target, fread($fp, 8192));
|
||||
}
|
||||
fclose($target);
|
||||
@chmod($path, $this->options['fileMode']);
|
||||
clearstatcache();
|
||||
return $path;
|
||||
|
||||
Reference in New Issue
Block a user