You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by am...@apache.org on 2006/08/03 11:14:29 UTC

svn commit: r428289 - /xerces/c/trunk/src/xercesc/util/FileManagers/WindowsFileMgr.cpp

Author: amassari
Date: Thu Aug  3 02:14:29 2006
New Revision: 428289

URL: http://svn.apache.org/viewvc?rev=428289&view=rev
Log:
Implement open(const char* path) by invoking open(const XMLCh* path)

Modified:
    xerces/c/trunk/src/xercesc/util/FileManagers/WindowsFileMgr.cpp

Modified: xerces/c/trunk/src/xercesc/util/FileManagers/WindowsFileMgr.cpp
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/util/FileManagers/WindowsFileMgr.cpp?rev=428289&r1=428288&r2=428289&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/util/FileManagers/WindowsFileMgr.cpp (original)
+++ xerces/c/trunk/src/xercesc/util/FileManagers/WindowsFileMgr.cpp Thu Aug  3 02:14:29 2006
@@ -178,23 +178,11 @@
 
 
 FileHandle
-WindowsFileMgr::open(const char* path, bool toWrite, MemoryManager* const /*manager*/)
+WindowsFileMgr::open(const char* path, bool toWrite, MemoryManager* const manager)
 {
-    FileHandle retVal = ::CreateFileA
-    (
-        path
-        , toWrite?GENERIC_WRITE:GENERIC_READ
-        , FILE_SHARE_READ
-        , 0
-        , toWrite?OPEN_ALWAYS:OPEN_EXISTING
-        , toWrite?FILE_ATTRIBUTE_NORMAL:FILE_FLAG_SEQUENTIAL_SCAN
-        , 0
-    );
-
-    if (retVal == INVALID_HANDLE_VALUE)
-        return 0;
-
-    return retVal;
+    XMLCh* tmpFileName = XMLString::transcode(path, manager);
+    ArrayJanitor<XMLCh> janText(tmpFileName, manager);
+    return open(tmpFileName, toWrite, manager);
 }
 
 



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org