feat: updater override .htaccess

1.5
Rodolfo Berrios 2021-10-04 09:28:56 -03:00
parent 27cd60be26
commit e3787edff9
No known key found for this signature in database
GPG Key ID: D3AAC2481DBDD9FE
1 changed files with 6 additions and 8 deletions

View File

@ -150,14 +150,12 @@ try {
]), 402); ]), 402);
} }
} else { } else {
if (!preg_match('/\.htaccess$/', $item)) { if (!@copy($item, $target)) {
if (!@copy($item, $target)) { $error = error_get_last();
$error = error_get_last(); throw new Exception(_s("Can't update %s file - %e", [
throw new Exception(_s("Can't update %s file - %e", [ '%s' => $target_visible,
'%s' => $target_visible, '%e' => $error['message']
'%e' => $error['message'] ]), 403);
]), 403);
}
} }
unlink($item); unlink($item);
} }