Mercurial > dwindows
diff os2/dw.c @ 1299:66d4e16349e0
Use DosQueryPathInfo() to get the full path of file/dir on OS/2.
Using FIL_QUERYFULLNAME as a replacement for realpath().
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Tue, 01 Nov 2011 20:29:58 +0000 |
parents | b99b0b2c2826 |
children | 68f18dccfb8f |
line wrap: on
line diff
--- a/os2/dw.c Tue Nov 01 13:05:26 2011 +0000 +++ b/os2/dw.c Tue Nov 01 20:29:58 2011 +0000 @@ -10106,7 +10106,10 @@ struct stat buf; if(defpath) - strcpy(fild.szFullFile, defpath); + { + if(DosQueryPathInfo(defpath, FIL_QUERYFULLNAME, fild.szFullFile, sizeof(fild.szFullFile))) + strcpy(fild.szFullFile, defpath); + }; len = strlen(fild.szFullFile); @@ -10114,7 +10117,7 @@ if(len) { /* Check to see if it exists */ - if(stat(defpath, &buf) == 0) + if(stat(fild.szFullFile, &buf) == 0) { /* If it is a directory... make sure there is a trailing \ */ if(buf.st_mode & S_IFDIR)