Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#545 Overwriting remote files leads to file corruption

closed-rejected
nobody
None
5
2012-09-13
2010-08-30
Yuttadhammo
No

In Geany 0.19, overwriting 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. Saving a remote file is okay, but overwriting does not work. An example is enclosed.

Not sure if it's Geany's fault, but Gedit works fine.

Discussion

  • Yuttadhammo
    Yuttadhammo
    2010-08-30

    corrupted resave of a sample text file

     
    Attachments
  • Vitaliy
    Vitaliy
    2010-09-29

    Hi,

    I have exactly the same problem. gedit works fine. It is weird but netbeans have the same problem when saving to a mounted ftp.

     
  • Vitaliy
    Vitaliy
    2010-09-29

    I appears it is a bug in gvfs, someone already tried to report it https://bugzilla.gnome.org/show_bug.cgi?id=599155

    I found a lot of other complaints that geany doesn't overwrite properly. But it happens in other applications too...

     
  • Yuttadhammo
    Yuttadhammo
    2010-09-29

    The problem only appeared last month... before upgrading Ubuntu to Maverick, I had no problem with Geany. That bug was filed in 2009, so it must not be the same issue. Either that or this is a regression.

     
  • Vitaliy
    Vitaliy
    2010-09-29

    I suppose you didn't see this issue before because Ubuntu doesn't include the latest software. I have been experiencing this issue starting with the upgrade of gnome to 2.30 in Arch.

    Anyway I have updated that bug, it was closed. I have used your example file if you don't mind :)

     
  • Yuttadhammo
    Yuttadhammo
    2010-09-29

    Ah yes, sorry. Indeed, reverting to the old Geany 0.18 doesn't resolve the problem. I am surprised Ubuntu would be a year behind in its packages, though...

     
  • Vitaliy
    Vitaliy
    2010-10-01

    HI yuttadhammo,

    I found a funny thing. Enabling use_safe_file_saving in geany settings (.config/geany/geany.conf ) to "true" fixes the issue.

    Not sure how to fix it for netbeans. But at least it works in Geany now :)

     
  • Nick Treleaven
    Nick Treleaven
    2010-10-01

    BTW, the use_safe_file_saving pref will reset the file permissions, but may prevent corruption issues.

    A better workaround is being considered, patch here:
    http://www.mail-archive.com/geany-devel@uvena.de/msg02338.html

     
  • Vitaliy
    Vitaliy
    2010-10-01

    thanks ntrel, I discovered this issue too :S

    Anyway the is a bug in gvfs though that doesn't let to handle saving files directly.

     
  • Lex Trotman
    Lex Trotman
    2012-09-13

    Not a Geany bug, GVFS bug fixed.

     
  • Lex Trotman
    Lex Trotman
    2012-09-13

    • status: open --> closed-rejected