After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 631403 - Saving file to FTP appends it, not overwrites
Saving file to FTP appends it, not overwrites
Status: RESOLVED FIXED
Product: gvfs
Classification: Core
Component: ftp backend
1.6.x
Other Linux
: Normal major
: ---
Assigned To: gvfs-maint
gvfs-maint
Depends on:
Blocks:
 
 
Reported: 2010-10-05 11:46 UTC by ngsupb
Modified: 2010-10-13 21:33 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
corrupted file after editing and saving (2.93 KB, application/octet-stream)
2010-10-05 11:46 UTC, ngsupb
Details

Description ngsupb 2010-10-05 11:46:02 UTC
Created attachment 171756 [details]
corrupted file after editing and saving

Multi-platform applications ( for example Geany, Netbeans, Komodo ) can't save files through gvfs to ftp mounted connections properly


Creating files to ftp works fine. But editing and saving a remote file leads to the data simply being added to the end of the file, thereby corrupting the file and making it twice as large as the original. The corrupted file example is attached.

The native GTK applications for example gedit and leafpad are working fine.

I suppose that Geany, Netbeans, Komodo and other applications uses some method to save files that is supported on windows and linux. But doesn't work properly with gvfs. 

How to replicate it:

1) Mount FTP files through nautilus
2) Open some file with Geany or Netbeans or Komodo, change it and save
3) Reopen the file to see the issue.
Comment 1 amatus 2010-10-06 11:16:52 UTC
I confirm this problem. After file editing through sftp in geany it has been spoiled.
Comment 2 ngsupb 2010-10-06 12:31:26 UTC
I would add that in case of sftp the behavior a bit differently. The same problem with the those multi-platform applications. Instead of appending the files the are truncated to zero.
Comment 3 Tomas Bzatek 2010-10-13 14:57:10 UTC
Can you please test the patch posted in bug 627567?
Comment 4 amatus 2010-10-13 15:41:02 UTC
Problem fixed for me with this patch.
Comment 5 ngsupb 2010-10-13 21:33:10 UTC
Thank you Tomas! it fixes the issue. 

/sending to Tomas a lot of beer