# HG changeset patch # User Sascha Wilde # Date 1395746991 -3600 # Node ID 199878f09bf1c76968ed6c2eef598a08861e7006 # Parent d47de01d6ad7445fe29d3a8b7f33aed8b8284ea4# Parent 8cfcd38a9bb36b95cad90e960f7d2acdabb1eae9 Merged diff -r 8cfcd38a9bb3 -r 199878f09bf1 common/portpath.c --- 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 }