You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by xe...@xml.apache.org on 2004/09/30 16:06:32 UTC
[jira] Closed: (XERCESC-1274) in solaris - XMLPlatformUtils::openFileToWrite does not "reset" the content of the existing file
Message:
The following issue has been closed.
Resolver: PeiYong Zhang
Date: Thu, 30 Sep 2004 7:05 AM
Oded,
Your patch is in cvs, please help verify, thanks.
Rgds,
PeiYong
---------------------------------------------------------------------
View the issue:
http://issues.apache.org/jira/browse/XERCESC-1274
Here is an overview of the issue:
---------------------------------------------------------------------
Key: XERCESC-1274
Summary: in solaris - XMLPlatformUtils::openFileToWrite does not "reset" the content of the existing file
Type: Bug
Status: Closed
Priority: Minor
Resolution: FIXED
Project: Xerces-C++
Components:
Utilities
Versions:
2.5.0
Assignee:
Reporter: oded cohen
Created: Mon, 20 Sep 2004 7:27 AM
Updated: Thu, 30 Sep 2004 7:05 AM
Environment: solaris
Description:
in Solaris (unlike in Linux & Windows which I also use..) - the XMLPlatformUtils::openFileToWrite() method does not "reset" the content of the file if it already existed. The result is that when I try to use DomWriter in order to write DOMNode into the file, the content of the DOMNode overwrites the beginning of the file, leaving me with "garbage" in the end.
I made a simple fix in my sources by adding the flag "O_TRUNC" when opening the file:
open( fileName , O_WRONLY | O_CREAT | O_TRUNC | O_LARGEFILE, 0666);
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org