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/20 16:27:45 UTC

[jira] Created: (XERCESC-1274) in solaris - XMLPlatformUtils::openFileToWrite does not "reset" the content of the existing file

Message:

  A new issue has been created in JIRA.

---------------------------------------------------------------------
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: Unassigned
   Priority: Minor

    Project: Xerces-C++
 Components: 
             Utilities
   Versions:
             2.5.0

   Assignee: 
   Reporter: oded cohen

    Created: Mon, 20 Sep 2004 7:27 AM
    Updated: Mon, 20 Sep 2004 7:27 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


[jira] Commented: (XERCESC-1274) in solaris - XMLPlatformUtils::openFileToWrite does not "reset" the content of the existing file

Posted by xe...@xml.apache.org.
The following comment has been added to this issue:

     Author: PeiYong Zhang
    Created: Tue, 21 Sep 2004 11:48 AM
       Body:
Oded,

   As the community becomes more and more concerned about the license and copyright issues related to code contribution, we would be more than happy to check in the patch submitted once you have kindly completed the followings:
 
   .Who is your employer?
	
   .Did you write the code that you wish to contribute to Apache? If not, please identify the complete details of the code's source and of any licenses or restrictions applicable to the code.

   .Do you have the right to grant the copyright and patent licenses for the contribution that are set forth in the ASF v.2.0 license (http://www.apache.org/licenses/LICENSE-2.0)
    
   .Does your employer have any rights to the code that you have written, for example, through your contract for employment?  If so, has your employer given you permission to contribute the code on its behalf or waived its rights in the code?
	
   .Are you aware of any third-party licenses or other restrictions (such as related patents or trademarks), that could apply to your contribution? If so, what are they?

Rgds,
PeiYong

---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/browse/XERCESC-1274?page=comments#action_53289

---------------------------------------------------------------------
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: Unassigned
   Priority: Minor

    Project: Xerces-C++
 Components: 
             Utilities
   Versions:
             2.5.0

   Assignee: 
   Reporter: oded cohen

    Created: Mon, 20 Sep 2004 7:27 AM
    Updated: Tue, 21 Sep 2004 11:48 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


[jira] Closed: (XERCESC-1274) in solaris - XMLPlatformUtils::openFileToWrite does not "reset" the content of the existing file

Posted by xe...@xml.apache.org.
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