[Sugar-devel] [PATCH] Cleanup temporary files on startup (v2)

Bernie Innocenti bernie at codewiz.org
Thu May 13 14:42:32 EDT 2010


This fixes part of http://bugs.sugarlabs.org/ticket/1876 , which is
affecting both 0.84 and 0.88.

To reclaim space in case of a crash, we also need to delete temporary
files at startup time. The rest of the bug is addressed by a separate
patch in sugar-toolkit.

This version of the patch takes into account the current SUGAR_PROFILE
and addresses the request to remove the temporary files before invoking
cleanup_logs().

Signed-off-by: Bernie Innocenti <bernie at codewiz.org>
Reviewed-by: James Cameron <quozl at laptop.org>
---
 bin/sugar.in |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/bin/sugar.in b/bin/sugar.in
index 898bd59..0c5baee 100644
--- a/bin/sugar.in
+++ b/bin/sugar.in
@@ -65,4 +65,7 @@ fi
 echo Xcursor.theme: sugar | xrdb -merge
 metacity --no-force-fullscreen -d $DISPLAY &
 
+# Remove temporary files. See http://bugs.sugarlabs.org/ticket/1876
+rm -rf $HOME/.sugar/${SUGAR_PROFILE:-default}/data/*
+
 exec sugar-session
-- 
1.7.0.1



More information about the Sugar-devel mailing list