Added check for nonexistent directories in tar-mode
This commit is contained in:
parent
fba7b2e117
commit
4bfb5b92f8
|
@ -540,6 +540,8 @@ class ServeFile():
|
|||
raise ServeFileException("Error: Could not open file!")
|
||||
handler = FileHandler
|
||||
elif self.serveMode == self.MODE_SINGLETAR:
|
||||
if not os.path.exists(self.target):
|
||||
raise ServeFileException("Error: Could not open file or directory")
|
||||
TarFileHandler.target = self.target
|
||||
TarFileHandler.fileName = os.path.basename(self.target.rstrip("/"))
|
||||
|
||||
|
|
Loading…
Reference in New Issue