[Sugar-devel] [PATCH v2 sugar] sl#4276: As part of sugar-toolkit patch for this bug-fix, remove the icon-files directory on every reboot, to prevent accumulation of any spurious files. New files will be (re-)written by write-through mechanism.

Ajay Garg ajay at activitycentral.com
Tue Dec 11 03:28:01 EST 2012


Changes of version-2 over version-1 ::
=======================================

Now using tabs throughtouts for spacing, so that the patch is properly formatted/laid-out.
Thanks a ton to James Cameron (quozl at laptop.org) !!!


 bin/sugar-session | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/bin/sugar-session b/bin/sugar-session
index 3c86f3e..4069a1e 100755
--- a/bin/sugar-session
+++ b/bin/sugar-session
@@ -278,6 +278,13 @@ def main():
         shutil.rmtree(data_dir, ignore_errors=True)
         os.makedirs(data_dir)
         cleanup_logs(env.get_logs_path())
+
+	# http://bugs.sugarlabs.org/ticket/4276
+	# Remove the directory containing the icon-files.
+	# New files will be written by "write-through" mechanism, when first
+	# needed/accessed.
+	icon_files_dir = os.path.join(env.get_profile_path(), 'icon_files')
+	shutil.rmtree(icon_files_dir, ignore_errors=True)
     except OSError, e:
         # logs cleanup is not critical; it should not prevent sugar from
         # starting if (for example) the disk is full or read-only.
-- 
1.7.11.7



More information about the Sugar-devel mailing list