mirror of
https://github.com/mirror/make.git
synced 2025-02-13 05:10:46 +08:00
* src/read.c (tilde_expand): Put back '/' before returning.
Joe Filion <joefilion4@gmail.com> noted that the string is modified, and Henrik Carlqvist <hc94@poolhem.se> noticed that it wasn't put back in all cases.
This commit is contained in:
parent
320714ae85
commit
26f4bb89bd
@ -3044,7 +3044,7 @@ construct_include_path (const char **arg_dirs)
|
|||||||
char *
|
char *
|
||||||
tilde_expand (const char *name)
|
tilde_expand (const char *name)
|
||||||
{
|
{
|
||||||
#ifndef VMS
|
#if !defined(VMS)
|
||||||
if (name[1] == '/' || name[1] == '\0')
|
if (name[1] == '/' || name[1] == '\0')
|
||||||
{
|
{
|
||||||
char *home_dir;
|
char *home_dir;
|
||||||
@ -3099,7 +3099,8 @@ tilde_expand (const char *name)
|
|||||||
{
|
{
|
||||||
if (userend == 0)
|
if (userend == 0)
|
||||||
return xstrdup (pwent->pw_dir);
|
return xstrdup (pwent->pw_dir);
|
||||||
else
|
|
||||||
|
*userend = '/';
|
||||||
return xstrdup (concat (3, pwent->pw_dir, "/", userend + 1));
|
return xstrdup (concat (3, pwent->pw_dir, "/", userend + 1));
|
||||||
}
|
}
|
||||||
else if (userend != 0)
|
else if (userend != 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user