Skip to content

Commit

Permalink
Issue backdrop#4685: Do not copy htaccess file to prevent exceptions.
Browse files Browse the repository at this point in the history
By @indigoxela, @bradbulger, @BWPanda, and @klonos
  • Loading branch information
indigoxela committed Oct 17, 2020
1 parent 93fd450 commit 74805d1
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions core/modules/simpletest/backdrop_web_test_case.php
Expand Up @@ -1627,15 +1627,19 @@ protected function useCache() {
/**
* Recursively copy one directory to another.
*
* @param string $src
* Source directory to copy.
* @param string $dst
* Destination directory to copy files to.
*/
private function recursiveCopy($src, $dst) {
$dir = opendir($src);
if(!file_exists($dst)){
if (!file_exists($dst)) {
mkdir($dst);
}
while(false !== ( $file = readdir($dir)) ) {
if (( $file != '.' ) && ( $file != '..' )) {
if ( is_dir($src . '/' . $file) ) {
while (FALSE !== ($file = readdir($dir))) {
if ($file != '.' && $file != '..' && $file != '.htaccess') {
if (is_dir($src . '/' . $file)) {
$this->recursiveCopy($src . '/' . $file, $dst . '/' . $file);
}
else {
Expand Down

0 comments on commit 74805d1

Please sign in to comment.