Ticket #1876: 0001-Cleanup-temporary-files-on-startup.patch

File 0001-Cleanup-temporary-files-on-startup.patch, 1.2 KB (added by bernie, 14 years ago)

Partial fix

  • bin/sugar.in

    From 6a23435dc6c1262ddcd2e3c0e6f74a931c4bd35a Mon Sep 17 00:00:00 2001
    From: Bernie Innocenti <bernie@codewiz.org>
    Date: Wed, 21 Apr 2010 14:36:38 -0400
    Subject: [PATCH] Cleanup temporary files on startup (v2)
    Organization: Sugar Labs Foundation
    X-Subversion: sucks
    
    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@codewiz.org>
    Reviewed-by: James Cameron <quozl@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 b fi 
    6565echo Xcursor.theme: sugar | xrdb -merge
    6666metacity --no-force-fullscreen -d $DISPLAY &
    6767
     68# Remove temporary files. See http://bugs.sugarlabs.org/ticket/1876
     69rm -rf $HOME/.sugar/${SUGAR_PROFILE:-default}/data/*
     70
    6871exec sugar-session