Skip to content

Commit

Permalink
desktop: Demote a bit of enumerate_storage_devices() diagnostics on W…
Browse files Browse the repository at this point in the history
…indows

GetVolumeInformation() _will_ fail when looking at present removable
drives without any inserted media (optic drives, etc.). We shouldn't
make noise about that.
  • Loading branch information
irydacea committed Oct 12, 2016
1 parent 00f6417 commit fdd7b98
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/desktop/paths.cpp
Expand Up @@ -78,8 +78,9 @@ void enumerate_storage_devices(std::vector<path_info>& res)
wchar_t label[label_bufsize] = { 0 };

if(GetVolumeInformation(drive, label, label_bufsize, NULL, NULL, NULL, NULL, 0) == 0) {
// Probably an empty removable drive, just ignore it and carry on.
const DWORD err = GetLastError();
ERR_DU << "enumerate_win32_drives(): GetVolumeInformation() failed (" << err << ")\n";
LOG_DU << "enumerate_win32_drives(): GetVolumeInformation() failed (" << err << ")\n";
continue;
}

Expand Down

0 comments on commit fdd7b98

Please sign in to comment.