mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 02:03:04 +01:00
Treat getenv() with more respect
This commit is contained in:
parent
26f2d12a5c
commit
730e020f4d
@ -1113,12 +1113,12 @@ BOOLEAN API_ROUTINE isc_set_path(TEXT* file_name,
|
||||
* the ISC_PATH user variable.
|
||||
*
|
||||
**************************************/
|
||||
TEXT *pathname, *p;
|
||||
|
||||
/* look for the environment variables to tack
|
||||
onto the beginning of the database path */
|
||||
|
||||
if (!(pathname = getenv("ISC_PATH")))
|
||||
const TEXT* pathname = getenv("ISC_PATH");
|
||||
if (!pathname)
|
||||
return FALSE;
|
||||
|
||||
if (!file_length)
|
||||
@ -1128,6 +1128,8 @@ BOOLEAN API_ROUTINE isc_set_path(TEXT* file_name,
|
||||
/* if the file already contains a remote node
|
||||
or any path at all forget it */
|
||||
|
||||
TEXT *p;
|
||||
|
||||
for (p = file_name; *p; p++)
|
||||
if (*p == ':' || *p == '/' || *p == '\\')
|
||||
return FALSE;
|
||||
|
Loading…
Reference in New Issue
Block a user