db/simple: check for I/O errors in Load()

This commit is contained in:
Max Kellermann 2014-08-11 22:54:46 +02:00
parent 8283f23651
commit 43f964e28d

View File

@ -187,7 +187,7 @@ SimpleDatabase::Load(Error &error)
if (file.HasFailed()) if (file.HasFailed())
return false; return false;
if (!db_load_internal(file, *root, error)) if (!db_load_internal(file, *root, error) || !file.Check(error))
return false; return false;
struct stat st; struct stat st;