keep .htaccess file when downloading an extension

This commit is contained in:
Uwe Steinmann 2020-09-24 11:55:40 +02:00
parent e2f2021b19
commit 656cc5843f

View File

@ -256,7 +256,8 @@ class SeedDMS_Extension_Mgr {
if( in_array(substr($file, strrpos($file, '/')+1), array('.', '..')) )
continue;
// Ignore all files and directories starting with a '.'
if( preg_match('#/\\.#', $file) )
// but keep an .htaccess file
if( !preg_match('#\\.htaccess$#', $file) && preg_match('#/\\.#', $file) )
continue;
$file = realpath($file);