Changeset 5119:d12143e1a610
- Timestamp:
- 2007-04-10 19:28:14 (21 months ago)
- Author:
- Brendan Cully <brendan@…>
- Branch:
- HEAD
- Message:
-
Try to unlink old header cache if open fails
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r5117
|
r5119
|
|
| 983 | 983 | struct header_cache *h = safe_calloc(1, sizeof (HEADER_CACHE)); |
| 984 | 984 | int (*hcache_open) (struct header_cache* h, const char* path); |
| | 985 | struct stat sb; |
| 985 | 986 | |
| 986 | 987 | #if HAVE_QDBM |
| … |
… |
|
| 1009 | 1010 | else |
| 1010 | 1011 | { |
| | 1012 | /* remove a possibly incompatible version */ |
| | 1013 | if (!stat (path, &sb) && !unlink (path)) |
| | 1014 | { |
| | 1015 | if (!hcache_open (h, path)) |
| | 1016 | return h; |
| | 1017 | } |
| 1011 | 1018 | FREE(&h->folder); |
| 1012 | 1019 | FREE(&h); |