comparison 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
comparison
equal deleted inserted replaced
1298:79db0563c7c2 1299:66d4e16349e0
10104 HWND hwndFile; 10104 HWND hwndFile;
10105 int len; 10105 int len;
10106 struct stat buf; 10106 struct stat buf;
10107 10107
10108 if(defpath) 10108 if(defpath)
10109 strcpy(fild.szFullFile, defpath); 10109 {
10110 if(DosQueryPathInfo(defpath, FIL_QUERYFULLNAME, fild.szFullFile, sizeof(fild.szFullFile)))
10111 strcpy(fild.szFullFile, defpath);
10112 };
10110 10113
10111 len = strlen(fild.szFullFile); 10114 len = strlen(fild.szFullFile);
10112 10115
10113 /* If we have a defpath */ 10116 /* If we have a defpath */
10114 if(len) 10117 if(len)
10115 { 10118 {
10116 /* Check to see if it exists */ 10119 /* Check to see if it exists */
10117 if(stat(defpath, &buf) == 0) 10120 if(stat(fild.szFullFile, &buf) == 0)
10118 { 10121 {
10119 /* If it is a directory... make sure there is a trailing \ */ 10122 /* If it is a directory... make sure there is a trailing \ */
10120 if(buf.st_mode & S_IFDIR) 10123 if(buf.st_mode & S_IFDIR)
10121 { 10124 {
10122 if(fild.szFullFile[len-1] != '\\') 10125 if(fild.szFullFile[len-1] != '\\')