Dont remove the output folder if it's the source one ;)

This commit is contained in:
Alexis Metaireau 2010-11-20 00:54:33 +00:00
commit 9a51102f29
2 changed files with 4 additions and 2 deletions

View file

@ -7,6 +7,7 @@ from jinja2.exceptions import TemplateNotFound
from feedgenerator import Atom1Feed
from pelican.settings import read_settings
from pelican.utils import clean_output_dir
_TEMPLATES = ('index', 'tag', 'tags', 'article', 'category', 'categories',
'archives', 'page')
@ -52,6 +53,9 @@ class Generator(object):
if hasattr(p, 'preprocess'):
p.preprocess(context, self)
if self.output_path not in os.path.realpath(self.path):
clean_output_dir(self.output_path)
for p in processors:
p.process(context, self)