mirror of
https://github.com/ashaduri/gsmartcontrol.git
synced 2026-09-26 13:55:34 +00:00
Fixed compilation under MSYS2.
This commit is contained in:
@@ -112,7 +112,7 @@ std::map<char, DriveLetterInfo> win32_get_drive_letter_map()
|
||||
for (char c = 'A'; c <= 'Z'; ++c) {
|
||||
if (drives[c - 'A']) { // drive is present
|
||||
debug_out_dump("app", "Windows drive found: " << c << ".\n");
|
||||
if (GetDriveType((c + string(":\\")).c_str()) == DRIVE_FIXED) {
|
||||
if (GetDriveType((c + std::string(":\\")).c_str()) == DRIVE_FIXED) {
|
||||
debug_out_dump("app", "Windows drive " << c << " is fixed.\n");
|
||||
good_drives.push_back(c);
|
||||
}
|
||||
@@ -121,7 +121,7 @@ std::map<char, DriveLetterInfo> win32_get_drive_letter_map()
|
||||
|
||||
// Try to open each drive, check its disk extents
|
||||
for (char drive : good_drives) {
|
||||
string drive_str = string("\\\\.\\") + drive + ":";
|
||||
std::string drive_str = std::string("\\\\.\\") + drive + ":";
|
||||
HANDLE h = CreateFileA(
|
||||
drive_str.c_str(), GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, nullptr,
|
||||
OPEN_EXISTING, FILE_FLAG_NO_BUFFERING | FILE_FLAG_RANDOM_ACCESS, nullptr);
|
||||
|
||||
Reference in New Issue
Block a user