fix: wtv-flashrom: fix search for local flashrom files
This commit is contained in:
@@ -26,8 +26,14 @@ if (!request_headers.query.path) {
|
||||
data = errpage[1];
|
||||
} else {
|
||||
var request_path = unescape(request_headers.query.path);
|
||||
var flashrom_file_path = service_dir + '/' + request_path;
|
||||
if (minisrv_config.services[service_name].use_zefie_server && !fs.existsSync(flashrom_file_path)) {
|
||||
var flashrom_file_path = null;
|
||||
Object.keys(service_vaults).forEach(function (g) {
|
||||
if (flashrom_file_path != null) return;
|
||||
flashrom_file_path = service_vaults[g].path + "/" + service_name + "/" + request_path;
|
||||
if (!fs.existsSync(flashrom_file_path)) flashrom_file_path = null;
|
||||
});
|
||||
|
||||
if (minisrv_config.services[service_name].use_zefie_server && !flashrom_file_path) {
|
||||
// read first 256 bytes of flashrom file from archive.midnightchannel.net
|
||||
// to get `flashrom_message` and `numparts` if missing
|
||||
var options = {
|
||||
|
||||
Reference in New Issue
Block a user