michaelogrant / macfusion

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

File Corruption When Edited File Is Smaller Than Original #272

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create a text file (I'm using GNU Emacs 22.0.50.1 (i386-apple-darwin8.5.1).  
See below for 
original text.

2. Save the file.

3. Use the cat command ssh'd directly on the remote machine to inspect the 
file.  The contents 
should look identical to the editor

4. Remove lines 5 - 8 and resave the file

5. Using cat on the remote machine, notice the contents no longer matches 
what's in the editor.  
See below for expected text and resulting text

What is the expected output? What do you see instead?

It seems that when the resulting file is smaller than the original, it is not 
properly truncated at 
the end.

What version of the product are you using? On what operating system?

MacFUSE-Core-10.5-1.3.1.dmg
MacFusion 1.2 Beta 3.dmg    
Mac OS X 10.5.1

local ssh: OpenSSH_4.5p1, OpenSSL 0.9.7l 28 Sep 2006
remote ssh: Remote protocol version 2.0, remote software version Sun_SSH_1.0
sshfs command:

MacFusion.app/Contents/PlugIns/SSHFS.plugin/Contents/Resources/sshfs-static 
rssg@localhost:berto /Volumes/rsops3 -p11022 -oCheckHostIP=no -
oStrictHostKeyChecking=no -oNumberOfPasswordPrompts=1 -ofollow_symlinks -f -
oPasswordAuthentication=no -oPubkeyAuthentication=yes -o sshfs_sync -o 
max_write=512 -
ovolicon=/Users/berto/Applications/utilities/MacFusion.app/Contents/PlugIns/SSHF
S.plugin/Co
ntents/Resources/SSHFS.icns -oreconnect -ovolname=rsops3 -oping_diskarb

Please provide any additional information below.

--- Original Text ---
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. 
Quisque tristique tristique orci. Morbi ut sapien. 
Sed nisi felis, aliquet at, venenatis sed, tempor vitae, lacus. 
Suspendisse consequat leo non mi. 
Aenean in velit at mauris varius mollis. 
Duis nec augue id magna nonummy ornare. 
Ut non dui id erat tristique pulvinar. 
In accumsan. 
Nam odio risus, rhoncus fringilla, tincidunt at, ullamcorper at, elit. 
In mattis orci vel enim. 
Vestibulum id tortor. 
Nunc sed mauris ut justo fringilla ornare. 
Ut lacinia nunc eu justo. Aliquam erat volutpat. 
Cras lacinia.

--- Expected Text ---
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. 
Quisque tristique tristique orci. Morbi ut sapien. 
Sed nisi felis, aliquet at, venenatis sed, tempor vitae, lacus. 
Suspendisse consequat leo non mi. 
Nam odio risus, rhoncus fringilla, tincidunt at, ullamcorper at, elit. 
In mattis orci vel enim. 
Vestibulum id tortor. 
Nunc sed mauris ut justo fringilla ornare. 
Ut lacinia nunc eu justo. Aliquam erat volutpat. 
Cras lacinia.

--- Resulting Text Directly on Remote Machine ---
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. 
Quisque tristique tristique orci. Morbi ut sapien. 
Sed nisi felis, aliquet at, venenatis sed, tempor vitae, lacus. 
Suspendisse consequat leo non mi. 
Nam odio risus, rhoncus fringilla, tincidunt at, ullamcorper at, elit. 
In mattis orci vel enim. 
Vestibulum id tortor. 
Nunc sed mauris ut justo fringilla ornare. 
Ut lacinia nunc eu justo. Aliquam erat volutpat. 
Cras lacinia.
nim. 
Vestibulum id tortor. 
Nunc sed mauris ut justo fringilla ornare. 
Ut lacinia nunc eu justo. Aliquam erat volutpat. 
Cras lacinia.

Thanks for any input!

Original issue reported on code.google.com by roberto....@gmail.com on 25 Jan 2008 at 1:05