30a695458e
New() launches background calculateSizeAndPopulateIndex which scans disk and calls insertBatch. Create does not wait on initDone, so a file can be written and indexed, discovered by the scan, then removed from d.info and disk by EvictLRU/EvictBySize. insertBatch then re-inserted the stale discoveredFile without checking the path still existed, so Stat succeeded from the index while os.Stat failed. Re-stat under the lock and skip gone files so evicted keys are not resurrected. Fixes #18.