michaelogrant / macfusion

Automatically exported from code.google.com/p/macfusion
Other
1 stars 1 forks source link

File corruption on FTP-mount #276

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Mount a FTP connection

2. Write some strings into a file, e.g.
step a) This is line a
step b) This is line b
step c) This is line c
step d) This is line d

3. Save the file on the FTP-mount

4. Delete line b and c, resulting in
step a) This is line a
step d) This is line d

5. Save again and close the file

6. Unmount FTP-connection

7. Mount FTP-connection again

8. Open the file you just edited. The result will be like
step a) This is line a
step d) This is line d
step c) This is line c
step d) This is line d

What is the expected output? What do you see instead?
Expected:
step a) This is line a
step d) This is line d

I see:
step a) This is line a
step d) This is line d
step c) This is line c
step d) This is line d

What version of the product are you using? On what operating system?
OSX: Tiger 10.4.11 (PPC)
MacFuse: MacFUSE-Core-10.4-1.5.0
MacFusion: Version 1.2 Beta 3 (1.1.268) 

Please provide any additional information below.
After some trial-and-error, it looks like the filesystem takes the new
content and inserts it into the original file, but keeps the original
filesize. When I let the file 'grow', everything goes fine.
In other words, it looks as if the old file is taken, the new content is
inserted into it, replacing the old content UP TO THE TOTAL AMOUNT OF BYTES
OF THE NEW CONTENT. 
old_content = 10 bytes
new_content = 8 bytes
The resulting file consists of 8 bytes new_content en the last 2 bytes of
old_content. 

If you close the file and then open it again, without unmounting and
mounting, you will see nothing strange. Has to do with some caching, I
suppose. Only after unmounting and mounting, the problem becomes visible.

Original issue reported on code.google.com by borre...@yahoo.com on 19 May 2008 at 8:40