mirror of
https://salsa.debian.org/srivasta/make-dfsg.git
synced 2025-02-11 22:57:58 +00:00
(func_realpath) [!HAVE_REALPATH]: Require the file to exist, as
realpath(3) does where it's supported.
This commit is contained in:
parent
1471af2de2
commit
e8fd23cc83
1 changed files with 4 additions and 1 deletions
|
@ -1998,6 +1998,9 @@ func_realpath (char *o, char **argv, const char *funcname UNUSED)
|
||||||
const char *path = 0;
|
const char *path = 0;
|
||||||
int doneany = 0;
|
int doneany = 0;
|
||||||
unsigned int len = 0;
|
unsigned int len = 0;
|
||||||
|
#ifndef HAVE_REALPATH
|
||||||
|
struct stat st;
|
||||||
|
#endif
|
||||||
PATH_VAR (in);
|
PATH_VAR (in);
|
||||||
PATH_VAR (out);
|
PATH_VAR (out);
|
||||||
|
|
||||||
|
@ -2012,7 +2015,7 @@ func_realpath (char *o, char **argv, const char *funcname UNUSED)
|
||||||
#ifdef HAVE_REALPATH
|
#ifdef HAVE_REALPATH
|
||||||
realpath (in, out)
|
realpath (in, out)
|
||||||
#else
|
#else
|
||||||
abspath (in, out)
|
abspath (in, out) && stat (out, &st) == 0
|
||||||
#endif
|
#endif
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue