Opened 14 years ago

Closed 14 years ago

#2139 closed Feature Requests (wontfix)

Possible robustness improvement to Windows equivalent() implementation

Reported by: Beman Dawes Owned by: Beman Dawes
Milestone: Boost 1.37.0 Component: filesystem
Version: Boost 1.35.0 Severity: Problem
Keywords: Cc:

Description

equivalent() is fragile in that corner cases, particularly for removable media, may incorrectly return true.

Is is possible to use GetVolumeInformation() or Win32_PhysicalMedia information to improve robustness?

See http://msdn.microsoft.com/en-us/library/aa364993(VS.85).aspx

Change History (1)

comment:1 by Beman Dawes, 14 years ago

Resolution: wontfix
Status: newclosed

GetVolumeInformation suffers from the problem as the current implementation; some media vendors assign duplicate volume serial numbers.

Win32_PhysicalMedia information doesn't add anything either.

GetFinalPathNameByHandle looks hopeful, but it is Vista only so I'm not sure its of much help.

Also, for most practical purposes the current implementation works quite well. The corner cases are pretty much limited to deliberate cloning of media, so in one sense these are equivalent, even if the media is physically different.

I'm going to close this ticket, but feel free to reopen it if you come up with a better solution.

Thanks,

--Beman

Note: See TracTickets for help on using tickets.