Skip to content
Snippets Groups Projects
Commit 6d41d290 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Filter out the non-viewable files for the next/prev file buttons

parent 50d04b24
No related branches found
No related tags found
No related merge requests found
...@@ -219,7 +219,7 @@ function nav_file(filename) ...@@ -219,7 +219,7 @@ function nav_file(filename)
var fb = FileBase(http_request.dir); var fb = FileBase(http_request.dir);
if(!fb.open()) if(!fb.open())
return null; return null;
var list = fb.get_names(); var list = fb.get_names().filter(viewable_file);
fb.close(); fb.close();
for(var i = 0; i < list.length; ++i) { for(var i = 0; i < list.length; ++i) {
if(list[i] == filename) { if(list[i] == filename) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment