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 765208 - save deletes files
save deletes files
Status: RESOLVED DUPLICATE of bug 656225
Product: gvfs
Classification: Core
Component: general
unspecified
Other Linux
: Normal critical
: ---
Assigned To: gvfs-maint
gvfs-maint
Depends on:
Blocks:
 
 
Reported: 2016-04-18 12:36 UTC by Markus Grob
Modified: 2016-06-10 11:26 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Markus Grob 2016-04-18 12:36:51 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
Comment 1 Olivier Sessink 2016-04-19 20:51:29 UTC
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?
Comment 2 Markus Grob 2016-04-20 14:03:27 UTC
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
Comment 3 Olivier Sessink 2016-04-20 20:46:56 UTC
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?
Comment 4 Markus Grob 2016-05-02 10:53:13 UTC
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.
Comment 5 Markus Grob 2016-05-02 11:07:57 UTC
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.
Comment 6 Markus Grob 2016-05-03 20:41:11 UTC
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.
Comment 7 Olivier Sessink 2016-05-03 21:35:06 UTC
do you have the same problem if you use the commandline gvfs tools? For example if you use the gvfs-copy tool?
Comment 8 Markus Grob 2016-05-11 17:00:35 UTC
As I haven't used the tools earlier, could you please give me a short example so I could test it?
Comment 9 Olivier Sessink 2016-06-08 20:08:45 UTC
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
Comment 10 Markus Grob 2016-06-08 22:38:03 UTC
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?
Comment 11 Olivier Sessink 2016-06-09 15:35:33 UTC
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.
Comment 12 Markus Grob 2016-06-09 19:59:56 UTC
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.
Comment 13 Olivier Sessink 2016-06-09 20:51:07 UTC
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
Comment 14 Ondrej Holy 2016-06-10 06:24:39 UTC
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 ***
Comment 15 Markus Grob 2016-06-10 11:06:28 UTC
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 ;-(
Comment 16 Markus Grob 2016-06-10 11:26:49 UTC
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.