We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 1ae73e9 + 9f35100 commit d22b68bCopy full SHA for d22b68b
src/web/source.rs
@@ -104,7 +104,7 @@ impl FileList {
104
return None;
105
}
106
107
- let files: Json = rows.get(0).get(5);
+ let files: Json = rows.get(0).get_opt(5).unwrap().ok()?;
108
109
let mut file_list: Vec<File> = Vec::new();
110
@@ -234,6 +234,11 @@ pub fn source_browser_handler(req: &mut Request) -> IronResult<Response> {
234
};
235
236
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
+ }
242
243
let page = Page::new(list)
244
.set_bool("show_parent_link", !req_path.is_empty())
0 commit comments