Ensure that mongo modulestore can create its data directory if it does not exist on disk

This commit is contained in:
David Baumgold
2014-03-18 09:38:08 -04:00
parent 0f0b2622eb
commit a564d4d9bf

View File

@@ -484,8 +484,7 @@ class MongoModuleStore(ModuleStoreWriteBase):
data_dir = getattr(item, 'data_dir', location.course)
root = self.fs_root / data_dir
if not root.isdir():
root.mkdir()
root.makedirs_p() # create directory if it doesn't exist
resource_fs = OSFS(root)