mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-19 19:15:22 +00:00
ignore empty cached files in JsonKeyValueStoreField, also for https://github.com/opnsense/plugins/issues/198
This commit is contained in:
parent
c72c1874b8
commit
2349bc39d2
@ -161,7 +161,8 @@ class JsonKeyValueStoreField extends BaseField
|
||||
$muttime = 0;
|
||||
} else {
|
||||
$stat = stat($sourcefile);
|
||||
$muttime = $stat['mtime'];
|
||||
// ignore empty files
|
||||
$muttime = $stat['size'] == 0 ? 0 : $stat['mtime'];
|
||||
}
|
||||
if (time() - $muttime > $this->internalConfigdPopulateTTL) {
|
||||
$act = $this->internalConfigdPopulateAct;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user