1
0
Fork 0
forked from github/pelican

remove WRITE_SELECTED

Implementation is buggy and unreliable. Therefore, it is better to
remove the functionality until a robust implementation is added.
This commit is contained in:
Deniz Turgut 2023-11-12 19:43:26 +03:00
commit 86d6898517
No known key found for this signature in database
GPG key ID: 87B7168D7AB3ED2F
8 changed files with 8 additions and 103 deletions

View file

@ -840,19 +840,6 @@ def split_all(path):
)
def is_selected_for_writing(settings, path):
"""Check whether path is selected for writing
according to the WRITE_SELECTED list
If WRITE_SELECTED is an empty list (default),
any path is selected for writing.
"""
if settings["WRITE_SELECTED"]:
return path in settings["WRITE_SELECTED"]
else:
return True
def path_to_file_url(path):
"""Convert file-system path to file:// URL"""
return urllib.parse.urljoin("file://", urllib.request.pathname2url(path))