Fixed overwriting of files when Folder::SKIP is set

This commit is contained in:
Angel S. Moreno 2014-09-06 18:32:45 -04:00
parent 07965d68ff
commit 29570e1d99

View file

@ -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));