Browse Source

Delete database file only after it is released

PR #18005.
adaptive-webui-19844
Vladimir Golovnev 2 years ago committed by GitHub
parent
commit
dcdbd02102
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      src/base/bittorrent/sessionimpl.cpp

7
src/base/bittorrent/sessionimpl.cpp

@ -1401,7 +1401,12 @@ void SessionImpl::endStartup(ResumeSessionContext *context)
context->startupStorage->deleteLater(); context->startupStorage->deleteLater();
if (context->currentStorageType == ResumeDataStorageType::Legacy) if (context->currentStorageType == ResumeDataStorageType::Legacy)
Utils::Fs::removeFile(dbPath); {
connect(context->startupStorage, &QObject::destroyed, [dbPath]
{
Utils::Fs::removeFile(dbPath);
});
}
} }
context->deleteLater(); context->deleteLater();

Loading…
Cancel
Save