Mitch Capper wrote: > This was to get much the same volume listing working ie for df: > ``` > Filesystem Size Used Avail Use% Mounted on > \Device\HarddiskVolume2 1.7T 781G 891G 47% M:\ > \Device\HarddiskVolume6 4.0G 19M 3.9G 1% M:\sandbox\limit_mount\ > \Device\HarddiskVolume5 931G 910G 21G 98% C:\ > ``` > In terms of \\?\Volume\{GUID} paths its a bit tricky. It is true, a > volume not assigned or mounted to at least one drive letter or path, can > generally still be accessed with the volume guid syntax (gives new > definition to 'unmounted'). First its often not parsable by things setup > to handle paths. Windows native file open/save dialog does not work with > volume guid based paths. Application based support varies a decent bit.
Good to know. So we now have two reasons for *not* returning directory names with GUID from these functions: - Most users cannot remember such directory names. - They don't work in applications and not even in the Windows native file chooser dialog. > https://github.com/mitchcapper/gnulib/compare/master...ours_win_fsusage_fixes?w=1#diff-7e2438152a60cd739a4b33b7800e08161ab5dd86c8dacb54f0ae749c9bc4f818 The first patch in this series could be a reasonable addition to Gnulib; I haven't looked in detail. The second patch in this series is redundant by now, since the current lib/mountlist.c already uses FindFirstVolume/FindNextVolume, QueryDosDevice, GetVolumePathNamesForVolumeName and GetVolumeInformation (which your patch does not use). Bruno