Skip to content

Commit

Permalink
Update hide file in dir rules
Browse files Browse the repository at this point in the history
  • Loading branch information
rexzhang committed Jun 20, 2022
1 parent 1b0dc6b commit 73faaef
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions asgi_webdav/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,10 +366,15 @@ def __str__(self):
# https://en.wikipedia.org/wiki/AppleSingle_and_AppleDouble_formats
# https://en.wikipedia.org/wiki/Windows_thumbnail_cache

_os_special_file_asgi_webdav = r".+\.WebDAV$"
_os_special_file_macos = r"^\.DS_Store$|^\._"
_os_special_file_windows = r"^Thumbs\.db$"
_os_special_file_synology = r"^#recycle$|^@eaDir$"

DEFAULT_HIDE_FILE_IN_DIR_RULES = {
"": r".+\.WebDAV$|^#recycle$|^@eaDir$",
"WebDAVFS": r"^Thumbs\.db$",
"Microsoft-WebDAV-MiniRedir": r"^\.DS_Store$$|^\._\.",
"": "|".join([_os_special_file_asgi_webdav, _os_special_file_synology]),
"WebDAVFS": _os_special_file_windows,
"Microsoft-WebDAV-MiniRedir": _os_special_file_macos,
}

RESPONSE_DATA_BLOCK_SIZE = 64 * 1024
Expand Down

0 comments on commit 73faaef

Please sign in to comment.