Skip to content

Commit 9f35100

Browse files
committed
show 404 when None is returned
1 parent 5e50873 commit 9f35100

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/web/source.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,11 @@ pub fn source_browser_handler(req: &mut Request) -> IronResult<Response> {
234234
};
235235

236236
let list = FileList::from_path(&conn, &name, &version, &req_path);
237+
if list.is_none() {
238+
use iron::status;
239+
use super::error::Nope;
240+
return Err(IronError::new(Nope::NoResults, status::NotFound));
241+
}
237242

238243
let page = Page::new(list)
239244
.set_bool("show_parent_link", !req_path.is_empty())

0 commit comments

Comments
 (0)