]> git.llucax.com Git - software/blitiri.git/blobdiff - blitiri.cgi
Create the comments directory for an article if it doesn't exist
[software/blitiri.git] / blitiri.cgi
index 0c4847583a96ab5a9180655c631357a9bc8b86f0..6ada91bfb9d82ffa650188d8d5337aa37788058e 100755 (executable)
@@ -775,6 +775,11 @@ class Comment (object):
 class CommentDB (object):
        def __init__(self, article):
                self.path = os.path.join(comments_path, article.uuid)
+               # if comments were enabled after the article was added, we
+               # will need to create the directory
+               if not os.path.exists(self.path):
+                       os.mkdir(self.path, 0755)
+
                self.comments = []
                self.load(article)