Skip to content
Snippets Groups Projects
Commit af2ce51e authored by echicken's avatar echicken :chicken:
Browse files

Use FileEntry.name property instead of blind assumptions.

parent 02d09d9d
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
...@@ -27,7 +27,7 @@ if ((http_request.method === 'GET' || http_request.method === 'POST') && ...@@ -27,7 +27,7 @@ if ((http_request.method === 'GET' || http_request.method === 'POST') &&
var fileBase = new FileBase(dircode); var fileBase = new FileBase(dircode);
var file = null; var file = null;
fileBase.some(function (e) { fileBase.some(function (e) {
if (e.base.toLowerCase() + '.' + e.ext.toLowerCase() !== http_request.query.file[0].toLowerCase()) { if (e.name.toLowerCase() !== http_request.query.file[0].toLowerCase()) {
return false; return false;
} else if (typeof e.path !== 'undefined') { } else if (typeof e.path !== 'undefined') {
file = e; file = e;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment