commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r823423 - /commons/sandbox/runtime/trunk/src/main/native/os/win32/wutil.c
Date Fri, 09 Oct 2009 06:34:48 GMT
Author: mturk
Date: Fri Oct  9 06:34:48 2009
New Revision: 823423

URL: http://svn.apache.org/viewvc?rev=823423&view=rev
Log:
Fix typos

Modified:
    commons/sandbox/runtime/trunk/src/main/native/os/win32/wutil.c

Modified: commons/sandbox/runtime/trunk/src/main/native/os/win32/wutil.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/win32/wutil.c?rev=823423&r1=823422&r2=823423&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/os/win32/wutil.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/os/win32/wutil.c Fri Oct  9 06:34:48 2009
@@ -394,6 +394,8 @@
 wchar_t *acr_GetAbsolutePath(JNIEnv *_E, HANDLE fh, const wchar_t *path)
 {
     wchar_t *fname = NULL;
+    int rc = 0;
+
     if (ACR_HAVE_LATE_DLL_FUNC(GetFinalPathNameByHandleW)) {
         DWORD nl;
         nl = GetFinalPathNameByHandleW(fh, NULL, 0, FILE_NAME_NORMALIZED);
@@ -406,7 +408,7 @@
             rc = ACR_ENOMEM;
             goto finally;
         }
-        GetFinalPathNameByHandleW(f, fname, nl, FILE_NAME_NORMALIZED);
+        GetFinalPathNameByHandleW(fh, fname, nl, FILE_NAME_NORMALIZED);
     }
     else {
         DWORD nl;
@@ -425,5 +427,7 @@
     }
 
 finally:
+    if (rc)
+        SetLastError(rc);
     return fname;
 }



Mime
View raw message