Mercurial > trustbridge
changeset 169:701b7036c5dc
Windows implementation of port_realpath: NULL if file does not exist.
author | Sascha Wilde <wilde@intevation.de> |
---|---|
date | Tue, 25 Mar 2014 13:20:23 +0100 |
parents | f100861dad8f |
children | 3343ddf43f42 |
files | common/portpath.c |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/common/portpath.c Tue Mar 25 13:08:59 2014 +0100 +++ b/common/portpath.c Tue Mar 25 13:20:23 2014 +0100 @@ -31,7 +31,11 @@ #ifndef _WIN32 return realpath(path, NULL); #else - return _fullpath(NULL, path, 0); + char *fp = _fullpath(NULL, path, 0); + if (port_fileexits(fp)) + return fp; + else + return NULL; #endif }