1
1
Fork 0
mirror of https://github.com/pbatard/rufus.git synced 2024-08-14 23:57:05 +00:00

[enum] fixed label display for drives with no label

This commit is contained in:
Pete Batard 2011-11-23 12:39:47 +00:00
parent 45406054cc
commit 18986bffa4

View file

@ -283,7 +283,7 @@ static BOOL GetDriveLabel(DWORD num, char* letter, char** label)
safe_closehandle(hDrive);
*letter = DrivePath[0];
if (GetVolumeInformationA(DrivePath, volume_label, sizeof(volume_label), NULL, NULL, NULL, NULL, 0)) {
if (GetVolumeInformationA(DrivePath, volume_label, sizeof(volume_label), NULL, NULL, NULL, NULL, 0) && *volume_label) {
*label = volume_label;
}