Skip to content

Commit bef9f76

Browse files
committed
Removing unnecessary slash in front of filename
1 parent 8a4f5c4 commit bef9f76

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

adafruit_httpserver/response.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,8 @@ def send_file(
235235

236236
if not root_path.endswith("/"):
237237
root_path += "/"
238+
if filename.startswith("/"):
239+
filename = filename[1:]
238240

239241
full_file_path = root_path + filename
240242

0 commit comments

Comments
 (0)