From b0fec9fd8ea076726c683cdc9520473d77ea55bd Mon Sep 17 00:00:00 2001 From: Oleksii Tsvietnov Date: Sun, 16 Apr 2017 02:10:04 +0200 Subject: [PATCH] Fix for the check: if the output directory is a part of the content path --- pelican/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pelican/__init__.py b/pelican/__init__.py index fa636bb0..c6881015 100644 --- a/pelican/__init__.py +++ b/pelican/__init__.py @@ -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: