changeset 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 79db0563c7c2
children 9c8de9cccc07
files os2/dw.c
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
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)