aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElena ``of Valhalla'' Grandi <valhalla@trueelena.org>2017-01-02 17:54:14 +0100
committerElena ``of Valhalla'' Grandi <valhalla@trueelena.org>2017-01-02 17:54:14 +0100
commit97a6ff92674a74a92050ae29e3606cb219b3ed93 (patch)
tree840b59b5306bd9a2f386405439c52425c47a7de7
parent3945aab1bc696a0a410d95ab65fddec70e9ee2f1 (diff)
When initializing a collection, also create itemdir
-rw-r--r--lesana/collection.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/lesana/collection.py b/lesana/collection.py
index 6e32929..84845f5 100644
--- a/lesana/collection.py
+++ b/lesana/collection.py
@@ -283,4 +283,6 @@ class Collection(object):
edit_file(filepath)
if git_enabled and repo:
repo.index.add(['settings.yaml'])
- return cls(c_dir)
+ coll = cls(c_dir)
+ os.makedirs(os.path.join(coll.basedir, coll.itemdir), exist_ok=True)
+ return coll