-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Content erased when editing and saving file on special unit such as mtp:// (Android device) and smb:// (Samba remote share) #13
Comments
What is it that you're using that adds support for those "special units"? Personally I use plain old /etc/fstab and nothing has ever been corrupted on samba shares, so that might narrow it down a little. |
Mounting it to a plain /etc/fstab probably it won't get corrupted, but what about hot mounted MTP devices such as an Android smartphone? Your configuration is a simple workaround, the bug is still there and I lost a couple of important files for it. By the way I am using LXDE on Parabola GNU/Linux that in turn uses gvfs-smb and gvfs-mtp to mount Samba shares and MTP devices respectively. They are mounted as special paths smb:// and mtp://. |
I wasn't suggesting it as a workaround, just wanted to find out where the problem is. |
Might be other affected software too: http://forums.fedoraforum.org/showthread.php?t=249927 |
From what you have found it looks like some applications are affected and some aren't. At the moment I'm trying to recover my files. If you don't mind, I will get back to make some tests when I'm done. |
I managed to recover my files. I was very upset about it. GVFS can't properly handle raw POSIX API calls, namely fwrite() used by L3afpad and the other affected applications. On the other hand, applications such as gedit that use the GIO library to save files are unaffected. I think GVFS "expects" GTK+ applications to use GIO instead of standard POSIX API. If you deem that your design using standard POSIX API calls to handle files is the right way to do operate and the problem solely lies in GVFS instead, feel free to close the bug report. Thank you very much for your attention and record-breaking prompt response. |
You're welcome; I'm glad you got your data back. I'm happy to leave this open (although lets call it a 'compatibility enhancement request'!) - the rest of it uses GTK stuff so there's no reason why file handling can't be done "their way" too. |
Hi, |
I understand the way you feel right now. You may try a full text search on the raw disk with wxHexEditor. |
I am just opening the Windows shared folder in (Lubuntu) PCManFM then opening, editing, and attempting to save the file same way as I would using the Windows 'network' icon. |
@stevenhoneyman good day! Consider this, please:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=680418#15
https://people.gnome.org/~shaunm/girdoc/C/Gtk.TextBuffer.set_modified.html
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=680418#34 And code: gtk_text_buffer_set_modified(buffer, FALSE);
fclose(fp); Also see https://bugzilla.redhat.com/show_bug.cgi?id=1295007#c1. Thanks. |
Easy steps to reproduce:
The same bug seems to affect GTK2+ version of Leafpad as well: http://unix.stackexchange.com/questions/202848/samba-erases-content-of-files-when-saving and https://bugs.archlinux.org/task/44681
Please note that smb shares are not the only units affected. MTP and other special mounts are affected, too.
The text was updated successfully, but these errors were encountered: