Skip to content
This repository has been archived by the owner on Oct 26, 2023. It is now read-only.

Commit

Permalink
support symlinks in tftp and http
Browse files Browse the repository at this point in the history
  • Loading branch information
psychomario committed Feb 21, 2015
1 parent d463204 commit cebef93
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pypxe/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def handleRequest(self, connection, addr):
startline = request.split('\r\n')[0].split(' ')
method = startline[0]
target = startline[1]
if not os.path.exists(target) or not os.path.isfile(target):
if not os.path.lexists(target) or not os.path.isfile(target):
status = '404 Not Found'
elif method not in ('GET', 'HEAD'):
status = '501 Not Implemented'
Expand Down
2 changes: 1 addition & 1 deletion pypxe/tftp.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def read(self, address, message):
file does not exist -> reply with error
'''
filename = self.filename(message)
if not os.path.exists(filename):
if not os.path.lexists(filename):
self.notFound(address)
return
self.ongoing[address]['filename'] = filename
Expand Down

0 comments on commit cebef93

Please sign in to comment.