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 756997 - [PATCH] sourceview plugin : SourceviewIO - Only emit "deleted" if monitored file isn't temporary
[PATCH] sourceview plugin : SourceviewIO - Only emit "deleted" if monitored ...
Status: RESOLVED FIXED
Product: anjuta
Classification: Applications
Component: plugins: editor: gtksourceview
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Johannes Schmid
Anjuta maintainers
Depends on:
Blocks:
 
 
Reported: 2015-10-23 02:36 UTC by Yannick Inizan
Modified: 2015-10-25 17:59 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
sourceview plugin : SourceviewIO - Only emit "deleted" if monitored file is temporary (1.24 KB, patch)
2015-10-23 02:36 UTC, Yannick Inizan
committed Details | Review
sourceview plugin : SourceviewIO - Only emit "deleted" if monitored file isn't temporary (1.22 KB, patch)
2015-10-23 02:39 UTC, Yannick Inizan
none Details | Review
[PATCH] sourceview plugin : SourceviewIO - Only emit "deleted" if monitored file isn't temporary (1.20 KB, patch)
2015-10-24 09:12 UTC, Yannick Inizan
none Details | Review
[PATCH] sourceview plugin : SourceviewIO - Only emit "deleted" if monitored file isn't temporary (1.04 KB, patch)
2015-10-25 13:47 UTC, Yannick Inizan
none Details | Review

Description Yannick Inizan 2015-10-23 02:36:12 UTC
Created attachment 313902 [details] [review]
sourceview plugin : SourceviewIO - Only emit "deleted" if  monitored file is temporary

"deleted" signal is emitted with temporary files, so check the filename for temporary chars.

this patch fixes #756426 : https://bugzilla.gnome.org/show_bug.cgi?id=756426
Comment 1 Yannick Inizan 2015-10-23 02:39:56 UTC
Created attachment 313903 [details] [review]
sourceview plugin : SourceviewIO - Only emit "deleted" if  monitored file isn't temporary
Comment 2 Sébastien Granjoux 2015-10-23 18:35:32 UTC
Thank you for this patch but do you know why the temporary file is monitored?
Comment 3 Yannick Inizan 2015-10-24 08:01:48 UTC
if I search 'gtksourceview .goutputstream' on the web, this link appears several times : https://bugs.launchpad.net/ubuntu/+source/lightdm/+bug/984785

.goutputstream-XXXXXX seems a temporary file generated inside SourceView - maybe g_file_new_tmp (gchar* tmpl, GFileIOStream** iostream) . tested with other editors (mousepad, geany, ..) this file appears on saved action. so this bug is related to GtkSourceView, not Anjuta
Comment 4 Sébastien Granjoux 2015-10-24 08:51:13 UTC
(In reply to Yannick Inizan from comment #3)
> if I search 'gtksourceview .goutputstream' on the web,

Is it always a file named .goutputstream-XXXX that give this issue? Because in you patch you check for any file starting with . or ending with ~.

I'm wondering what's happen if you want to edit a file starting with . in anjuta, by example a configuration file.
Comment 5 Yannick Inizan 2015-10-24 09:12:22 UTC
Created attachment 314004 [details] [review]
[PATCH] sourceview plugin : SourceviewIO - Only emit "deleted" if  monitored file isn't temporary

[PATCH] sourceview plugin : SourceviewIO - Only emit "deleted" if
 monitored file isn't temporary
Comment 6 Yannick Inizan 2015-10-24 09:12:47 UTC
updated
Comment 7 Sébastien Granjoux 2015-10-25 11:29:01 UTC
Review of attachment 313902 [details] [review]:

Thank you for this patch. You haven't really replied to my question but I suppose it's always a file named .goutputstream* that trigger the issue. Then just to be even better could you look for the filename only if the event G_FILE_MONITOR_EVENT_DELETED as it's not needed in other cases.
Comment 8 Yannick Inizan 2015-10-25 13:47:59 UTC
Created attachment 314070 [details] [review]
[PATCH] sourceview plugin : SourceviewIO - Only emit "deleted" if monitored file isn't temporary

look for the filename only if the event G_FILE_MONITOR_EVENT_DELETED is triggered.
Comment 9 Sébastien Granjoux 2015-10-25 14:31:15 UTC
Review of attachment 313902 [details] [review]:

That's fine for me. Can you commit it yourself or do you need that I do it for you?
Comment 10 Yannick Inizan 2015-10-25 17:00:48 UTC
I haven't write access, so commit it for me ;)
Comment 11 Sébastien Granjoux 2015-10-25 17:58:50 UTC
Review of attachment 313902 [details] [review]:

ok, I have committed your patch. I have free filename too.