diff --git a/lib/sugar/activity/activity.py b/lib/sugar/activity/activity.py index 7c095c5a..71e53452 100644 --- a/lib/sugar/activity/activity.py +++ b/lib/sugar/activity/activity.py @@ -689,7 +689,7 @@ class Activity(Window, gtk.Container): if self._jobject.file_path: self.write_file(self._jobject.file_path) else: - file_path = os.path.join(self.get_activity_root(), 'data', + file_path = os.path.join(self.get_activity_root(), 'instance', '%i' % time.time()) self.write_file(file_path) self._owns_file = True diff --git a/lib/sugar/activity/activityfactory.py b/lib/sugar/activity/activityfactory.py index 46b86891..8e49e948 100644 --- a/lib/sugar/activity/activityfactory.py +++ b/lib/sugar/activity/activityfactory.py @@ -82,6 +82,10 @@ def get_environment(activity): if not os.path.exists(activity_root): os.mkdir(activity_root) + data_dir = os.path.join(activity_root, 'instance') + if not os.path.exists(data_dir): + os.mkdir(data_dir) + data_dir = os.path.join(activity_root, 'data') if not os.path.exists(data_dir): os.mkdir(data_dir)