diff --git a/app.py b/app.py index 3855d4f..b68fb64 100644 --- a/app.py +++ b/app.py @@ -157,6 +157,7 @@ def ships(request): def ship(request,ship=None): if ship is None: return Response(Status.BAD_REQUEST,"Bad Request") ship_unquoted = urllib.parse.unquote(ship) + if not os.path.isdir(os.path.join("/var/gopher",ship_unquoted)): return Response(Status.NOT_FOUND,"Not Found") def __generator(): description = os.path.join("/var/gopher",ship_unquoted,".description") if os.path.exists(description):