[nautilus-actions] Do not return TRUE if desktop file is not written



commit 3c2f3501785bb2c22cac65bc6022b8e1dd927244
Author: Pierre Wieser <pwieser trychlos org>
Date:   Fri Sep 3 11:50:11 2010 +0200

    Do not return TRUE if desktop file is not written

 ChangeLog                          |    7 +++++++
 src/io-desktop/nadp-desktop-file.c |    5 ++++-
 2 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index de3fcfa..4ddfb46 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2010-09-02 Pierre Wieser <pwieser trychlos org>
+
+	* src/io-desktop/nadp-desktop-file.c (nadp_desktop_file_write):
+	Do not return TRUE if file has not been written due to dispose state.
+
+	* configure.ac: Setup the package URL.
+
 2010-08-30 Pierre Wieser <pwieser trychlos org>
 
 	* doc/nact/C/nact-starting.xml: Update manual.
diff --git a/src/io-desktop/nadp-desktop-file.c b/src/io-desktop/nadp-desktop-file.c
index 3054f97..1b6de2b 100644
--- a/src/io-desktop/nadp-desktop-file.c
+++ b/src/io-desktop/nadp-desktop-file.c
@@ -1046,6 +1046,7 @@ nadp_desktop_file_write( NadpDesktopFile *ndf )
 
 		data = g_key_file_to_data( ndf->private->key_file, NULL, NULL );
 		file = g_file_new_for_uri( ndf->private->uri );
+		g_debug( "%s: uri=%s", thisfn, ndf->private->uri );
 
 		stream = g_file_replace( file, NULL, FALSE, G_FILE_CREATE_NONE, NULL, &error );
 		if( error ){
@@ -1082,7 +1083,9 @@ nadp_desktop_file_write( NadpDesktopFile *ndf )
 		g_object_unref( stream );
 		g_object_unref( file );
 		g_free( data );
+
+		return( TRUE );
 	}
 
-	return( TRUE );
+	return( FALSE );
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]