Use Unicode Windows Env for Destroy in LevelDb.

PiperOrigin-RevId: 767303270
This commit is contained in:
Francis Tsui
2025-06-04 15:14:03 -07:00
committed by Copybara-Service
parent 2f07f1ceee
commit 5e1ec2c2e1
+5 -1
View File
@@ -226,7 +226,11 @@ void LeveldbDataSet<T, isMessageLite>::Destroy(
absl::AnyInvocable<void(bool) &&> callback) {
LOG(INFO) << "Destroy is called.";
db_.reset();
leveldb::DestroyDB(path_, leveldb::Options());
leveldb::Options options;
#if defined(_WIN32)
options.env = nearby::windows::WindowsEnv::Default();
#endif // defined(_WIN32)
leveldb::DestroyDB(path_, options);
std::move(callback)(true);
}