Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 2b51c92

Browse files
author
Thomas G. Lockhart
committed
Clean up handling of environment variables in path names.
1 parent 725bbde commit 2b51c92

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/backend/utils/misc/database.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/utils/misc/Attic/database.c,v 1.1 1997/11/07 07:05:46 thomas Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/utils/misc/Attic/database.c,v 1.2 1997/11/10 15:14:34 thomas Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -130,6 +130,10 @@ ExpandDatabasePath(char *dbpath)
130130
strncpy(buf,dbpath,(cp-dbpath));
131131
buf[cp-dbpath] = '\0';
132132
path = getenv(buf);
133+
/* problem getting environment variable? let calling routine handle it */
134+
if (path == NULL)
135+
return path;
136+
133137
sprintf(buf, "%s%cbase%c%s", path, SEP_CHAR, SEP_CHAR, (cp+1));
134138
}
135139
/* no path delimiter? then add the default path prefixes */

0 commit comments

Comments
 (0)