mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Fixed overwriting of files when Folder::SKIP is set
This commit is contained in:
parent
07965d68ff
commit
29570e1d99
1 changed files with 1 additions and 1 deletions
|
@ -673,7 +673,7 @@ class Folder {
|
|||
$to = Folder::addPathElement($toDir, $item);
|
||||
if (($options['scheme'] != Folder::SKIP || !is_dir($to)) && !in_array($item, $exceptions)) {
|
||||
$from = Folder::addPathElement($fromDir, $item);
|
||||
if (is_file($from)) {
|
||||
if (is_file($from) && (!is_file($to) || $options['scheme'] != Folder::SKIP)) {
|
||||
if (copy($from, $to)) {
|
||||
chmod($to, intval($mode, 8));
|
||||
touch($to, filemtime($from));
|
||||
|
|
Loading…
Reference in a new issue