www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 16337] New: Posix get empty environment value returns null

https://issues.dlang.org/show_bug.cgi?id=16337

          Issue ID: 16337
           Summary: Posix get empty environment value returns null
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: pull
          Severity: enhancement
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: schveiguy yahoo.com

If one saves an environment variable that is a blank string, and then retrieves
that value, the returned value is the null string.

While this normally would be fine (null is a valid blank string), the get
function uses null as a sentinel to signify that the environment variable isn't
present. This means one cannot distinguish between getting an environment
variable that is blank, and one that is missing.

PR: https://github.com/dlang/phobos/pull/4627

--
Jul 29 2016