On Friday, 14 September 2018 at 19:06:14 UTC, Josphe Brigmo wrote:
For very long file names it is broke and every command fails.
These paths are not all that long but over 256 limit. (For
windows)
The problem this causes can be disastrous. If some check fails
and runs code that isn't mean to run if the file exists, it
could destroy data.
I replaced many of the std.file functions with
executeShell(...) and using command line functions and they
work. But then my code was still failing and it was because
exist was returning false even though the file exists.
I'm sure this is not a big deal to some...
If you are on Windows 10 version 1607 or later, there's a
registry key you can set so that the default behavior of the
Win32 API allows long file path names. But yah, the problem is
Windows, its horrible file system and structure thereof. You'd
have faced this problem using any other language like C or C++
included.
HKLM\SYSTEM\CurrentControlSet\Control\FileSystem LongPathsEnabled
(Type: REG_DWORD)