Ticket #9315 (closed defect: duplicate)
File not being truncated on shared folder - WinXP 32 SP3 guest on WinXP 32 SP3 host, VBox 4.1.0+Guest Additions 4.1.0
|Reported by:||DfDf||Owned by:|
When a file on shared folder (for example - even a plain text) is being edited in Far ( http://www.farmanager.com) and when tail of file (for ex. - 4-5 last lines) is being deleted, after that file is saved - the tail remains in file as it was not deleted.
Steps to reproduce:
- Map a shared folder with full access and automount in guest OS.
- Put a short (about 1K) plain text file to shared folder.
- Download far manager from http://www.farmanager.com (open source).
- Install FAR in guest OS.
- Change to shared folder in guest OS via FAR. (Alt-F2)
- Press F4 (edit) on file from step 2.
- Remove several last lines (4-5) from the end of file (in any way - for ex. by Ctrl-Y).
- Press F2 to save changes (or ESC, and than confirm save).
- Quit editor by ESC.
- Open file in host OS (or even again in guest OS) in notepad. Observe the BUG - deleted lines are still present in the file AND file size IS NOT CHANGED.
FAR uses this steps to write to file:
- File is being read to memory, than closed.
- User edit the file and presses F2 to write to file.
- File is being reopened with write access.
- File is truncated to 0 bytes length.
- Memory is being written back to file.
At this point if file resides on shared folder and edited from guest OS - the BUG arrives.