[Xfce4-commits] [panel-plugins/xfce4-whiskermenu-plugin] 266/473: Use empty file for saving settings.

noreply at xfce.org noreply at xfce.org
Mon Feb 16 23:57:16 CET 2015


This is an automated email from the git hooks/post-receive script.

gottcode pushed a commit to branch master
in repository panel-plugins/xfce4-whiskermenu-plugin.

commit f2d60070d588f6f288b5afd97b62370d5771e2cd
Author: Graeme Gott <graeme at gottcode.org>
Date:   Wed Dec 4 10:25:17 2013 -0500

    Use empty file for saving settings.
---
 panel-plugin/settings.cpp |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/panel-plugin/settings.cpp b/panel-plugin/settings.cpp
index 9c9978c..314b411 100644
--- a/panel-plugin/settings.cpp
+++ b/panel-plugin/settings.cpp
@@ -23,6 +23,8 @@
 
 #include <libxfce4util/libxfce4util.h>
 
+#include <unistd.h>
+
 using namespace WhiskerMenu;
 
 //-----------------------------------------------------------------------------
@@ -184,6 +186,9 @@ void Settings::save(char* file)
 		return;
 	}
 
+	// Start with fresh settings
+	unlink(file);
+
 	XfceRc* rc = xfce_rc_simple_open(file, false);
 	g_free(file);
 	if (!rc)

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list