Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAleksey Lim <alsroot@member.fsf.org>2010-06-02 10:31:14 (GMT)
committer Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>2010-06-02 12:33:43 (GMT)
commit7e5b8ee22743d7900022df15d0b9e4f6a4273942 (patch)
tree6d9c1d0eaa8ce31072aae80ed046dc6d2bda8b6f
parent8e6af12d6d04f0d298b92b8feca92819b58cdb66 (diff)
Failure to cleanup temporary files after filesystem full errors #1876
-rwxr-xr-x[-rw-r--r--]bin/sugar-session5
1 files changed, 5 insertions, 0 deletions
diff --git a/bin/sugar-session b/bin/sugar-session
index 1582b65..cc8358c 100644..100755
--- a/bin/sugar-session
+++ b/bin/sugar-session
@@ -20,6 +20,7 @@ import os
import sys
import time
import subprocess
+import shutil
if os.environ.get('SUGAR_LOGGER_LEVEL', '') == 'debug':
print '%r STARTUP: Starting the shell' % time.time()
@@ -203,6 +204,10 @@ def set_fonts():
def main():
try:
from sugar import env
+ # 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(env.get_logs_path())
except OSError, e:
# logs cleanup is not critical; it should not prevent sugar from