Fix install error (25463447 regression)

This commit is contained in:
Kijin Sung 2021-06-19 20:13:02 +09:00
parent 65dc194ed4
commit 1400895d27

View file

@ -137,6 +137,8 @@ class Config
// Backup the main config file. // Backup the main config file.
$config_filename = \RX_BASEDIR . self::$config_filename; $config_filename = \RX_BASEDIR . self::$config_filename;
if (Storage::exists($config_filename))
{
$backup_filename = \RX_BASEDIR . self::$config_filename . '.backup.' . time() . '.php'; $backup_filename = \RX_BASEDIR . self::$config_filename . '.backup.' . time() . '.php';
$result = Storage::copy($config_filename, $backup_filename); $result = Storage::copy($config_filename, $backup_filename);
clearstatcache(true, $backup_filename); clearstatcache(true, $backup_filename);
@ -144,6 +146,7 @@ class Config
{ {
return false; return false;
} }
}
// Save the main config file. // Save the main config file.
$buff = '<?php' . "\n" . '// Rhymix System Configuration' . "\n" . 'return ' . self::serialize(self::$_config) . ';' . "\n"; $buff = '<?php' . "\n" . '// Rhymix System Configuration' . "\n" . 'return ' . self::serialize(self::$_config) . ';' . "\n";