mirror of
https://github.com/apple/foundationdb.git
synced 2025-05-14 09:58:50 +08:00
Make use of relpath instead of basepath
This commit is contained in:
parent
4804bb21cf
commit
b53c9fe851
@ -519,13 +519,13 @@ class Server(BaseHTTPRequestHandler):
|
||||
if self.path.startswith("/check_hash/"):
|
||||
try:
|
||||
self.send_text(
|
||||
check_hash(os.path.basename(self.path)), add_newline=False
|
||||
check_hash(os.path.relpath(self.path, "/check_hash")), add_newline=False
|
||||
)
|
||||
except FileNotFoundError:
|
||||
self.send_error(404, "Path not found")
|
||||
self.end_headers()
|
||||
if self.path.startswith("/is_present/"):
|
||||
if is_present(os.path.basename(self.path)):
|
||||
if is_present(os.path.relpath(self.path, "/is_present")):
|
||||
self.send_text("OK")
|
||||
else:
|
||||
self.send_error(404, "Path not found")
|
||||
|
Loading…
x
Reference in New Issue
Block a user