function system_update_8801 in Drupal 8
Remove 'path.temporary' config if redundant.
File
- core/
modules/ system/ system.install, line 2639 - Install, update and uninstall functions for the system module.
Code
function system_update_8801() {
// If settings is already being used, or the config is set to the OS default,
// clear the config value.
$config = Drupal::configFactory()
->getEditable('system.file');
if (Settings::get('file_temp_path') || $config
->get('path.temporary') === FileSystemComponent::getOsTemporaryDirectory()) {
$config
->clear('path.temporary')
->save(TRUE);
}
}