[Issue 16337] New: Posix get empty environment value returns null
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Fri Jul 29 18:52:10 PDT 2016
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 at puremagic.com
Reporter: schveiguy at 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
--
More information about the Digitalmars-d-bugs
mailing list