Fixing fnmatch patterns
This commit is contained in:
parent
3aeb5a23db
commit
101ddc102a
|
@ -378,10 +378,11 @@ function recurse_copy(
|
|||
$excluded = false;
|
||||
foreach($excludes as $exclude_pattern)
|
||||
$excluded = $excluded || (bool)preg_match("~$exclude_pattern~", $src . '/' . $file);
|
||||
$fnmatched = sizeof($fnmatches) == 0;
|
||||
foreach($fnmatches as $fnmatch)
|
||||
$excluded = $excluded || !fnmatch($fnmatch, $file);
|
||||
$fnmatched = $fnmatched || fnmatch($fnmatch, $file);
|
||||
|
||||
if($excluded)
|
||||
if($excluded || !$fnmatched)
|
||||
continue;
|
||||
|
||||
_ensure_copy_file($src . '/' . $file, $dst . '/' . $file, $copy_mode, $mtime_check);
|
||||
|
|
Loading…
Reference in New Issue