[bluefish] Update patch for #663014 to fix another potential issue that was discovered
Paul Howarth
pghmcfc at fedoraproject.org
Sun Dec 19 13:14:50 UTC 2010
commit 309fe0f3f96a09fa86cf1a7db2922cc0a2d1ac39
Author: Paul Howarth <paul at city-fan.org>
Date: Sun Dec 19 13:14:14 2010 +0000
Update patch for #663014 to fix another potential issue that was discovered
bluefish.spec | 5 ++++-
fedora_bug_663014.patch | 36 +++++++++++++++++++++++++++---------
2 files changed, 31 insertions(+), 10 deletions(-)
---
diff --git a/bluefish.spec b/bluefish.spec
index 349c212..5bdc580 100644
--- a/bluefish.spec
+++ b/bluefish.spec
@@ -1,6 +1,6 @@
%global pkgver 2.0.2
#global prerel rc1
-%global rpmrel 5
+%global rpmrel 6
Name: bluefish
Version: %{pkgver}
@@ -151,6 +151,9 @@ fi
%{_mandir}/man1/%{name}.1*
%changelog
+* Sun Dec 19 2010 Paul Howarth <paul at city-fan.org> - 2.0.2-6
+- Update patch for #663014 to fix another potential issue that was discovered
+
* Wed Dec 15 2010 Paul Howarth <paul at city-fan.org> - 2.0.2-5
- Fix crash in autosave (#663014)
diff --git a/fedora_bug_663014.patch b/fedora_bug_663014.patch
index 08b7ee2..53916ac 100644
--- a/fedora_bug_663014.patch
+++ b/fedora_bug_663014.patch
@@ -11,20 +11,26 @@ Index: src/file_autosave.c
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
-@@ -227,8 +227,11 @@
+@@ -222,12 +222,17 @@
+
+ static inline void autosave(Tdocument *doc, GHashTable *hasht) {
+ Trefcpointer *buffer;
++ gchar *data;
+ DEBUG_MSG("autosave doc %p\n",doc);
+ if (!doc->autosave_uri) {
doc->autosave_uri = create_autosave_path(doc, hasht);
g_hash_table_insert(hasht, g_file_get_path(doc->autosave_uri), GINT_TO_POINTER(1));
}
-+
- buffer = refcpointer_new(doc_get_chars(doc, 0, -1));
-- doc->autosave_action = file_checkNsave_uri_async(doc->autosave_uri, NULL, buffer, strlen(buffer->data), FALSE, FALSE, (CheckNsaveAsyncCallback)autosave_complete_lcb, doc);
-+ if (buffer->data) {
-+ doc->autosave_action = file_checkNsave_uri_async(doc->autosave_uri, NULL, buffer, strlen(buffer->data), FALSE, FALSE, (CheckNsaveAsyncCallback)autosave_complete_lcb, doc);
-+ }
+- buffer = refcpointer_new(doc_get_chars(doc, 0, -1));
++ data = doc_get_chars(doc, 0, -1);
++ if (!data || data[0]=='\0')
++ return;
++
++ buffer = refcpointer_new(data);
+ doc->autosave_action = file_checkNsave_uri_async(doc->autosave_uri, NULL, buffer, strlen(buffer->data), FALSE, FALSE, (CheckNsaveAsyncCallback)autosave_complete_lcb, doc);
refcpointer_unref(buffer);
}
-
-@@ -268,7 +271,7 @@
+@@ -268,7 +273,7 @@
while (tmplist) {
gchar **arr = (gchar **)tmplist->data;
GFile *recover_uri;
@@ -33,3 +39,15 @@ Index: src/file_autosave.c
tmplist = g_list_next(tmplist);
continue;
}
+Index: src/document.c
+===================================================================
+--- src/document.c (revision 6096)
++++ src/document.c (working copy)
+@@ -2084,6 +2084,7 @@
+ }
+ DEBUG_MSG("doc_destroy, (doc=%p) after calling notebook_changed()\n",doc);
+ /* now we really start to destroy the document */
++ remove_autosave(doc);
+ g_object_unref(GTK_OBJECT(doc->view->parent));
+ if (doc->uri) {
+ if (main_v->props.backup_cleanuponclose) {
More information about the scm-commits
mailing list