GNOME Bugzilla – Bug 756997
[PATCH] sourceview plugin : SourceviewIO - Only emit "deleted" if monitored file isn't temporary
Last modified: 2015-10-25 17:59:04 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
Created attachment 313903 [details] [review] sourceview plugin : SourceviewIO - Only emit "deleted" if monitored file isn't temporary
Thank you for this patch but do you know why the temporary file is monitored?
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
(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.
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
updated
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.
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.
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?
I haven't write access, so commit it for me ;)
Review of attachment 313902 [details] [review]: ok, I have committed your patch. I have free filename too.