diff options
author | Justin Mayer <entroP@gmail.com> | 2020-04-15 14:55:41 +0200 |
---|---|---|
committer | Justin Mayer <entroP@gmail.com> | 2020-04-15 15:19:41 +0200 |
commit | 9d10abaed4c3fd208dee98ed431ab6ddfbb0d6fa (patch) | |
tree | b218044927f47b76664a0eba1d936aa698ec9a88 /pelican/__main__.py | |
parent | 7e52b61934b0fd2fa830125bfb1fedbddf08f11d (diff) | |
download | pelican-fix-delete-output-logic.tar.gz |
Fix output directory deletion logicfix-delete-output-logic
The intention was to prevent accidental source content data loss by
skipping output directory deletion if the output directory is a parent
of the source content directory. But the previous implementation did so
by checking path *strings*, resulting in scenarios where the following
settings would erroneously skip deletion of the output directory:
PATH = "/repo/docs-src/content"
OUTPUT_PATH = "/repo/docs"
The output directory should have been deleted but wasn't because the
PATH string contains "/repo/docs". This change eschews string comparison
and instead compares actual paths to ensure that the output path is not
a parent of the source content directory.
Diffstat (limited to 'pelican/__main__.py')
0 files changed, 0 insertions, 0 deletions