diff options
author | Richard Hughes <richard@hughsie.com> | 2009-03-05 09:40:10 +0000 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2009-03-05 09:40:10 +0000 |
commit | 746d4b8035a4ca7908503e7bbbea4db7284766e9 (patch) | |
tree | 8dc7a4d5c9e2dfd4aa9da68e6a9e2f956f9d81bd | |
parent | b964fa179dce1cb2e2bee4091fc0c04eb5af6d5b (diff) |
regenerate cache if it's zero sized
Sometimes when systems go a bit haywire, the cache file is
written out as a zero byte file. We're still debugging this,
but in the case of a zero byte cache, just regenerate it anyway
-rw-r--r-- | hald/mmap_cache.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/hald/mmap_cache.c b/hald/mmap_cache.c index 6125cf01..cc1ffa59 100644 --- a/hald/mmap_cache.c +++ b/hald/mmap_cache.c @@ -265,6 +265,10 @@ di_cache_coherency_check (gboolean setup_watches) HAL_INFO(("Cache needs update")); regen_cache(); did_regen = TRUE; + } else if (st.st_size == 0) { + HAL_INFO(("Cache zero size, so regenerating")); + regen_cache(); + did_regen = TRUE; } } else { regen_cache(); |