Skip to content

Commit

Permalink
Remove unnecessary call to string()
Browse files Browse the repository at this point in the history
  • Loading branch information
eversinc33 committed Jan 3, 2025
1 parent 9ad2712 commit 85baef4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/blockchain_db/lmdb/db_lmdb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1357,7 +1357,7 @@ static bool disable_ntfs_compression(const boost::filesystem::path& filepath)

USHORT compression_state = COMPRESSION_FORMAT_NONE;
DWORD bytes_returned;
BOOL ok = DeviceIoControl(
BOOL ok = ::DeviceIoControl(
file_handle,
FSCTL_SET_COMPRESSION,
&compression_state,
Expand All @@ -1368,7 +1368,7 @@ static bool disable_ntfs_compression(const boost::filesystem::path& filepath)
nullptr
);

CloseHandle(file_handle);
::CloseHandle(file_handle);
return ok;
}
#endif
Expand Down Expand Up @@ -1405,7 +1405,7 @@ void BlockchainLMDB::open(const std::string& filename, const int db_flags)
LOG_PRINT_L0("Failed to disable NTFS compression on folder: " << filename << ". Error: " << ::GetLastError());
boost::filesystem::path datafile(filename);
datafile /= CRYPTONOTE_BLOCKCHAINDATA_FILENAME;
boost::filesystem::ofstream(datafile.string()).close(); // touch the file to ensure it exists
boost::filesystem::ofstream(datafile).close(); // touch the file to ensure it exists
if (!disable_ntfs_compression(datafile))
throw DB_ERROR("Database file is NTFS compressend and compression could not be disabled");
#endif
Expand Down

0 comments on commit 85baef4

Please sign in to comment.