GNOME Bugzilla – Bug 765208
save deletes files
Last modified: 2016-06-10 11:26:49 UTC
I have a strange bug. When I save a file, a copy with ~ is created, but the originally file is deleted. When I save it twice, the original file is generated again. After closing bluefish, the copy is deleted. I have deleted the .bluefish directory to be sure, that I use the original settings, but it still happens. I never had this before, so I don't know what to do. Markus
I have no idea what could cause this. Bluefish uses GVFS to automatically save files and create backup files (these are the files with ~ appended). you can change the settings (in the preferences) "Create backup file during file save" and "Remove backup file on close" and see if this changes the behavior?
I have tried it without backup file and also withour removing. As I'm using Bluefish since 2.25, I know, that it should work. The only possibility is, that it couldn't handle the networkshare I'm using from virtualbox to the windows. But I have used it earlier also this way, so it couldn't be a general error. I only have installed the share again after updating. Could it be, that the handling has changed in 2.27? Markus
not the code in Bluefish, but perhaps GVFS has changed the code that handles windows shares? Possibly you upgraded not only bluefish but also related libraries?
Now I have tested it. It seems to be GVFS, because I have now the same behavior in 2.2.5 and also in 2.2.8. My question is, how is this solvable. If the error is in GVFS, I have to tell them, that kind of code Bluefish sends, so that they can reproduce the error to fix it.
Hm, maybe, it's a problem in VirtualBox itself, because I have GVFS downgraded to 1.24.2 from 2015, but the error still exists. But in Bluefish 2.2.8 I get now (GVFS 1.24.2 and also 1.24.3 from march) the following error (in german): ** (bluefish:28258): WARNING **: error getting file info for file:///media/sf_transfer/softwaredb/error404.php: Fehler beim Holen der Informationen für Datei »/media/sf_transfer/softwaredb/error404.php«: Datei oder Verzeichnis nicht gefunden english: error while getting informations for file ... file or directory not found This error is given after pressing save -> in this step, the original file is deleted and the backup file (~) is created.
Now I have tested it with Virtualbox 5.0.10 from december and also with Arch Linux. Same behaviour. I don't know, what I shall try now. I could use 2 local directories, but it's still a workaround.
do you have the same problem if you use the commandline gvfs tools? For example if you use the gvfs-copy tool?
As I haven't used the tools earlier, could you please give me a short example so I could test it?
echo "hello" | gvfs-save -b file:///media/sf_transfer/softwaredb/test.php echo "hello again" | gvfs-save -b file:///media/sf_transfer/softwaredb/test.php gvfs-cat file:///media/sf_transfer/softwaredb/test.php~ gvfs-cat file:///media/sf_transfer/softwaredb/test.php
Thank you for your testcase: markus@linux-vrvl:~/Downloads/FileZilla3/bin> echo "hello" | gvfs-save -b file:///media/sf_transfer/softwaredb/test.php -> File test.php is written. markus@linux-vrvl:~/Downloads/FileZilla3/bin> echo "hello again" | gvfs-save -b file:///media/sf_transfer/softwaredb/test.php Fehler beim Schließen: Fehler beim Umbenennen der temporären Datei: Das Programm kann nicht ausgeführt oder verändert werden (busy) Translation: Error closing: Failed to rename the temporary file: The program can not be executed or changed (busy) -> The file doesn't exist anymore. Only the test.php~ is there. Now what should I do?
we now have a proof that the problem is not Bluefish specific but a problem in GVFS. I'll re-file this bugreport as a GVFS bugreport.
Thank you. Now we only have to find out, where the problem is, if it's VirtualBox or gvfs or the combination of both together.
or the networkshare that is mounted from virtualbox to the windows machine! I guess from the description it's a native (Linux level) smb mounted directory
It is not GVfs bug, because GVfs is not involved at all in this case. The problem is probably in GLib/GIO. There is already Bug 656225 for GLib, so marking as duplicate. By the way the original error is: Error closing: Error renaming temporary file: Text file busy *** This bug has been marked as a duplicate of bug 656225 ***
I have found a solution for Bluefish and it's something like for Gedit. I have disabled to make a security copy of the file while saving. With this, the original file will not be deleted anymore. The security solution makes the program unsecure ;-(
The solution was no solution. Without this entry, Bluefish doesn't save something. The save button turns to "saved" but nothing happens on the file.