Fix for the check: if the output directory is a part of the content path

This commit is contained in:
Oleksii Tsvietnov 2017-04-16 02:10:04 +02:00
commit b0fec9fd8e

View file

@ -163,7 +163,7 @@ class Pelican(object):
# erase the directory if it is not the source and if that's
# explicitly asked
if (self.delete_outputdir and not
os.path.realpath(self.path).startswith(self.output_path)):
os.path.commonpath((self.path, self.output_path)) != self.output_path):
clean_output_dir(self.output_path, self.output_retention)
for p in generators: