aboutsummaryrefslogtreecommitdiffstats
path: root/libbe
diff options
context:
space:
mode:
authorW. Trevor King <wking@drexel.edu>2008-12-04 12:07:49 -0500
committerW. Trevor King <wking@drexel.edu>2008-12-04 12:07:49 -0500
commitebeca26c2c8fdf2dab77c57e1e1ab9b2a0a704dc (patch)
tree1954a5943381bc8ce31859dea8bbb3cdee1331ff /libbe
parent2447b5df014630d402f1fe28db6898a981f5ada0 (diff)
downloadbugseverywhere-ebeca26c2c8fdf2dab77c57e1e1ab9b2a0a704dc.tar.gz
Fixed missing directory error when merging comments onto a bare bug.
If bug_A had no comments (and so, no comment directory), changing comment settings before saving raised missing directory errors. save_settings had previously assumed the .be/bugs/XYZ/comments/ directory existed, which wasn't true for comment-less bugs. Now it checks, and creates the directory if necessary.
Diffstat (limited to 'libbe')
-rw-r--r--libbe/comment.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/libbe/comment.py b/libbe/comment.py
index 6c0e5c0..cb5ea59 100644
--- a/libbe/comment.py
+++ b/libbe/comment.py
@@ -275,6 +275,8 @@ class Comment(Tree, settings_object.SavedSettingsObject):
self._setup_saved_settings()
def save_settings(self):
+ parent_dir = os.path.dirname(self.get_path())
+ self.rcs.mkdir(parent_dir)
self.rcs.mkdir(self.get_path())
path = self.get_path("values")
mapfile.map_save(self.rcs, path, self._get_saved_settings())