www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 17488] New: Platform-inconsistent behavior from getTempDir()


          Issue ID: 17488
           Summary: Platform-inconsistent behavior from getTempDir()
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: dlang ryanjframe.com

On Windows, std.file's getTempDir() ends with a path separator, but on POSIX it
does not.

Consistent behaviour would allow cross-platform code to e.g., (if we add the
slash to POSIX) simply do "getTempDir() ~ myname.tmp", rather than require
checking for the platform.

I can do the PR if I know the desired behaviour (add the slash to POSIX or
remove it from Windows).

Jun 10 2017