Mercurial > trustbridge
changeset 166:199878f09bf1
Merged
author | Sascha Wilde <wilde@intevation.de> |
---|---|
date | Tue, 25 Mar 2014 12:29:51 +0100 |
parents | d47de01d6ad7 (diff) 8cfcd38a9bb3 (current diff) |
children | 92d7e0b40808 |
files | common/portpath.c |
diffstat | 1 files changed, 8 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/common/portpath.c Tue Mar 25 10:29:12 2014 +0000 +++ b/common/portpath.c Tue Mar 25 12:29:51 2014 +0100 @@ -12,11 +12,14 @@ #ifndef _WIN32 return dirname(path); #else - if (path){}; - fprintf(stderr, "Windows Suport missing!"); - abort(); + char drive[_MAX_DRIVE]; + char dir[_MAX_DIR]; + _splitpath(path, drive, dir, NULL, NULL); + /* We assume: drive + dir is shorter than + * drive + dir + fname + ext */ + sprintf(path, "%s%s", drive, dir); + return path; #endif - } char * @@ -25,8 +28,6 @@ #ifndef _WIN32 return realpath(path, NULL); #else - if (path){}; - fprintf(stderr, "Windows Suport missing!"); - abort(); + return _fullpath(NULL, path, 0); #endif }