diff --git a/pelican/__init__.py b/pelican/__init__.py index d5cf2d04..edd30968 100644 --- a/pelican/__init__.py +++ b/pelican/__init__.py @@ -65,8 +65,8 @@ class Pelican(object): # erase the directory if it is not the source and if that's # explicitely asked - if (self.delete_outputdir and - os.path.realpath(self.path).startswith(self.output_path)): + if (self.delete_outputdir and not + os.path.realpath(self.path).startswith(self.output_path)): clean_output_dir(self.output_path) writer = self.get_writer()