summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/environ.cc
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/environ.cc')
-rw-r--r--winsup/cygwin/environ.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/winsup/cygwin/environ.cc b/winsup/cygwin/environ.cc
index 2c6e13b39..43b246e27 100644
--- a/winsup/cygwin/environ.cc
+++ b/winsup/cygwin/environ.cc
@@ -137,7 +137,7 @@ posify (char **here, const char *value)
char *outenv = (char *) malloc (1 + len + conv->posix_len (value));
memcpy (outenv, src, len);
conv->toposix (value, outenv + len);
- conv->add_cache (outenv + len, value);
+ conv->add_cache (outenv + len, *value != '/' ? value : NULL);
debug_printf ("env var converted to %s", outenv);
*here = outenv;