#417 [PATCH] bugfix: file truncated when saving ANSI file

open-accepted
nobody
Unicode (53)
5
2010-11-05
2010-10-03
No

If you set a callback function to be called when you try to save a file in ANSI encoding format and from this callback you cancel saving, your pre-existing file will be truncated.

This happens because the SaveToFile method creates a FileStream (truncating it's previous content) and then calls SaveToStream, but the callback is only called from SaveToStream.

The attached patch tries to fix this.

Hope it helps.

João Toledo

Discussion

  • João Alexandre de Toledo

    • labels: --> Unicode
    • summary: [PATCH] Fix bug: file truncated when saving ANSI file --> [PATCH] bugfix: file truncated when saving ANSI file
     
  • PyScripter

    PyScripter - 2010-11-05
    • status: open --> open-accepted
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks