diff options
author | Simon Schampijer <simon@schampijer.de> | 2010-10-26 13:10:52 (GMT) |
---|---|---|
committer | Simon Schampijer <simon@schampijer.de> | 2010-10-26 13:10:52 (GMT) |
commit | ea4cf53473a487382ee2001159df2878eb3b448c (patch) | |
tree | 064eca3e682c1f2a3b3037c1cb947db50844bb11 | |
parent | cd603de21269975bb4c5b14527039c06704014cd (diff) |
Cleanup temporary files on startup #10301
-rw-r--r-- | bin/sugar-session | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/bin/sugar-session b/bin/sugar-session index ec25cba..57a361e 100644 --- a/bin/sugar-session +++ b/bin/sugar-session @@ -139,6 +139,10 @@ def set_fonts(): def main(): try: + # Remove temporary files. See http://bugs.sugarlabs.org/ticket/1876 + data_dir = os.path.join(env.get_profile_path(), 'data') + shutil.rmtree(data_dir, ignore_errors=True) + os.makedirs(data_dir) cleanup_logs() except OSError, e: # logs cleanup is not critical; it should not prevent sugar from |