phobo's std.file is completely broke!

Vladimir Panteleev thecybershadow.lists at gmail.com
Tue Sep 18 01:28:26 UTC 2018


On Monday, 17 September 2018 at 22:58:46 UTC, tide wrote:
> version(Windows)
> {
>     if(path.length >= MAX_PATH)
>     {
>         // throw Exception(...) // effectively what happens now
>
>         // do workaround for
>     }
> }
>
> The complexity would only exist for those that need it. It'd be 
> the difference between their code not working and code working. 
> I'm sure people would rather their code work than not work in 
> this case.

No good:

1. When hitting the situation where the extra logic does make a 
difference, and the program is operating on paths with some being 
under the the limit and some over, this will make it behave 
inconsistently depending on the data it's operating on.

2. When the registry key you mentioned is set, the workaround is 
unnecessary, and the extra logic can introduce unwanted behavior.

> Not that crazy, you can get the actual absolutePath with one of 
> the OS functions. It isn't that difficult of a workaround.

Which OS function is that, for the record?



More information about the Digitalmars-d mailing list