You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Track which directory a relative-path DirEntry is relative to #11101
andrej.mitrovich (@AndrejMitrovic) reported this on 2011-06-09T16:13:56Z
I can't officially classify this as a bug. Jonathan said it might be a good idea to put it here just so it doesn't get lost, and then we can later decide if it's a bug or if we should just be careful what we do.
Here's some buggy code which might throw an exception (if you're lucky!):
This might throw something like this:
std.file.FileException@std\file.d(1124): .\foo\bar.d: The system cannot find the path specified.
The problem is chdir will modify curdir, and dirEntries doesn't store 'curdir' internally as an absolute address, so calling chdir() screws up the behavior of dirEntries.
Notes
Absolute paths are not a suitable solution for POSIX.
The root cause of all confusion is that DirEntry can implicitly convert to string.
Activity