Ticket #2149: migration.patch
File migration.patch, 652 bytes (added by carrott, 13 years ago) |
---|
-
/
old new 102 102 def _migrate_file(root_path, old_root_path, uid): 103 103 if os.path.exists(os.path.join(old_root_path, uid)): 104 104 new_data_path = layoutmanager.get_instance().get_data_path(uid) 105 os.rename(os.path.join(old_root_path, uid), 105 new_data_dir = os.path.dirname(new_data_path) 106 if not os.path.exists(new_data_dir): 107 os.makedirs(new_data_dir) 108 os.rename(os.path.join(old_root_path, uid), 106 109 new_data_path) 107 110 108 111