0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-06-11 06:28:55 +02:00

ircd::db::database: Fix fdelections() call in read-only mode; minor cleanup.

This commit is contained in:
Jason Volk 2022-06-28 21:56:01 -07:00
parent 3e3483a2d1
commit 2d3fe97fe9

View file

@ -452,14 +452,16 @@ ircd::db::fdeletions(database &d,
const bool &enable,
const bool &force)
{
if(enable) throw_on_error
{
d.d->EnableFileDeletions(force)
};
else throw_on_error
{
d.d->DisableFileDeletions()
};
if(enable)
throw_on_error
{
d.d->EnableFileDeletions(force)
};
else
throw_on_error
{
d.d->DisableFileDeletions()
};
}
void
@ -1246,7 +1248,7 @@ try
// Disable file deletions here if ordered by the conf item (generally for
// -safe mode operation). If this can be done via DBOptions rather than
// here it would be better.
if(!db::auto_deletion)
if(!db::auto_deletion && !read_only)
db::fdeletions(*this, false);
// Conduct drops from schema changes. The database must be fully opened