mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-11-26 01:12:39 +00:00
Remove check is_directory check on lmdb path
The check interferes with raw device/partition support.
This commit is contained in:
parent
b096e16699
commit
033a32a20b
1 changed files with 2 additions and 8 deletions
|
@ -1307,14 +1307,8 @@ void BlockchainLMDB::open(const std::string& filename, const int db_flags)
|
|||
throw0(DB_OPEN_FAILURE("Attempted to open db, but it's already open"));
|
||||
|
||||
boost::filesystem::path direc(filename);
|
||||
if (boost::filesystem::exists(direc))
|
||||
{
|
||||
if (!boost::filesystem::is_directory(direc))
|
||||
throw0(DB_OPEN_FAILURE("LMDB needs a directory path, but a file was passed"));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!boost::filesystem::create_directories(direc))
|
||||
if (!boost::filesystem::exists(direc) &&
|
||||
!boost::filesystem::create_directories(direc)) {
|
||||
throw0(DB_OPEN_FAILURE(std::string("Failed to create directory ").append(filename).c_str()));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue