Community
Participate
Working Groups
Created attachment 186172 [details] potential fix FileStoreTextFileBuffer.java seems to incorrectly handle IOExceptions. - If the file exists, #setFileContents is called. This method eats all IOExceptions. - If the file doesn't exist the IOException is eaten on close() (can lead to a similar issue as described in Bug 332543) Potential patch for the issue. Make #setFileContents throw IOException and commitFileBufferContent re-throws the IOException as a CoreException. Existing tests in FileBuffersTestSuite pass.
Fixed without using the patch (FileStoreTextFileBuffer.java rev. 1.12). Available in builds >= N20110107-2000.
Created attachment 186252 [details] further fix Thanks Dani. Unfortunately your fix still suffers from the issue in Bug 332543. You need to explicitly close() the outputstreams without disregarding the IOException, as some filesystems defer errors to close rather than on write.
Issue still exists on close()
Thanks James. Committed the patch to HEAD with the following addition to the copyright notice: James Blackburn <jamesblackburn+eclipse@gmail.com> - [implementation] FileStoreTextFileBuffer eats IOException on external file save - https://bugs.eclipse.org/333660
Verified in I20110124-1800 through code inspection.