On 09/19/2018 07:04 AM, Vladimir Panteleev wrote:
On Wednesday, 19 September 2018 at 05:49:41 UTC, Nick Sabalausky
(Abscissa) wrote:
2. Detect and reject any non-\\?\ path longer than MAX_PATH-12 bytes[5].
This is not a good criteria: relative paths whose pointing to objects
whose absolute path exceeds MAX_PATH will fail, too. So, it looks like
Phobos would need to expand relative paths unconditionally.
I'm not sure I'm quite following you. Is this what you mean?:
string dir = ...; // Such that...
assert( dir.isRelativePath );
assert( dir.length < MAX_LENGTH-12 );
assert( dir.toAbsolutePath.length > MAX_LENGTH-12 );
// ??? This *currently* goes BOOM on Windows
// ??? installations with MAX_LENGTH restriction active?
rmdir(path);
(Not on a Win box at the moment.)