mirror of
https://github.com/typecho/typecho.git
synced 2025-04-22 10:43:57 +02:00
Fix use SQLite error of windows install (#1471)
This commit is contained in:
parent
f07b57fe20
commit
d15fc14463
@ -1022,7 +1022,12 @@ function install_step_2_perform()
|
||||
$error = (new \Typecho\Validate())
|
||||
->addRule('dbFile', 'required', _t('确认您的配置'))
|
||||
->addRule('dbFile', function (string $path) {
|
||||
return !!preg_match("/^(\/[._a-z0-9-]+)*[a-z0-9]+\.[a-z0-9]{2,}$/i", $path);
|
||||
$pattern = "/^(\/[._a-z0-9-]+)*[a-z0-9]+\.[a-z0-9]{2,}$/i";
|
||||
if (strstr(PHP_OS, 'WIN'))
|
||||
{
|
||||
$pattern = "/(\/[._a-z0-9-]+)*[a-z0-9]+\.[a-z0-9]{2,}$/i";
|
||||
}
|
||||
return !!preg_match($pattern, $path);
|
||||
}, _t('确认您的配置'))
|
||||
->run($config);
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user