Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnish Mangal <anish@sugarlabs.org>2011-08-10 12:08:07 (GMT)
committer Anish Mangal <anish@sugarlabs.org>2011-08-26 06:19:51 (GMT)
commit6ec3676fb011f2340bafefc511d06a4555d85762 (patch)
tree5a5c7c510a1048fe243793bbf23d87d328c1ee93
parentb86e012014303da5e7f96863a99de782acbce963 (diff)
migration.patchdx1.5
Signed-off-by: Anish Mangal <anish@sugarlabs.org>
-rw-r--r--src/carquinyol/migration.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/carquinyol/migration.py b/src/carquinyol/migration.py
index 80adbae..ef71460 100644
--- a/src/carquinyol/migration.py
+++ b/src/carquinyol/migration.py
@@ -102,7 +102,10 @@ def _migrate_metadata(root_path, old_root_path, uid):
def _migrate_file(root_path, old_root_path, uid):
if os.path.exists(os.path.join(old_root_path, uid)):
new_data_path = layoutmanager.get_instance().get_data_path(uid)
- os.rename(os.path.join(old_root_path, uid),
+ new_data_dir = os.path.dirname(new_data_path)
+ if not os.path.exists(new_data_dir):
+ os.makedirs(new_data_dir)
+ os.rename(os.path.join(old_root_path, uid),
new_data_path)