From 97ec9918f76ca9137aa0b6c3b6fdbe7007547020 Mon Sep 17 00:00:00 2001 From: Michael Lazar Date: Sun, 12 Jan 2020 14:03:37 -0500 Subject: [PATCH] Allow files starting with ~ in directory listings --- jetforce.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jetforce.py b/jetforce.py index d929ee5..2524d9d 100755 --- a/jetforce.py +++ b/jetforce.py @@ -310,8 +310,8 @@ class StaticDirectoryApplication(JetforceApplication): yield f"=>/{url_path.parent}\t..\r\n".encode() for file in sorted(filesystem_path.iterdir()): - if file.name.startswith((".", "~")): - # Skip hidden and temporary files for security reasons + if file.name.startswith("."): + # Skip hidden directories/files that may contain sensitive info continue elif file.is_dir(): yield f"=>/{url_path / file.name}/\t{file.name}/\r\n".encode()