From c46093345688ccc85b3f48e81c5b0082c3ac1164 Mon Sep 17 00:00:00 2001 From: Korbinian Maier Date: Tue, 10 Oct 2023 12:51:28 +0200 Subject: [PATCH] Remove leading slash for paths to be retrieved The leading slash breaks windows compatibily as paths starting with `/C:/` can't be resolved on windows. --- swift/SwiftRoute.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/swift/SwiftRoute.py b/swift/SwiftRoute.py index eb97412..6fb18c1 100644 --- a/swift/SwiftRoute.py +++ b/swift/SwiftRoute.py @@ -387,7 +387,7 @@ def do_GET(self): self.path = "index.html" elif self.path.startswith("/retrieve/"): # print(f"Retrieving file: {self.path[10:]}") - self.path = urllib.parse.unquote(self.path[9:]) + self.path = urllib.parse.unquote(self.path[10:]) self.send_file_via_real_path() return