From 1154c14c239a77e06732b859ca0b7ccf0ea3dd3a Mon Sep 17 00:00:00 2001 From: int2001 Date: Thu, 21 Nov 2024 12:11:10 +0000 Subject: [PATCH] Make LoTW-Downloads threadsafe --- application/controllers/Lotw.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/controllers/Lotw.php b/application/controllers/Lotw.php index ecd1c90b1..ee9a42fbe 100644 --- a/application/controllers/Lotw.php +++ b/application/controllers/Lotw.php @@ -664,7 +664,7 @@ class Lotw extends CI_Controller { } $config['upload_path'] = './uploads/'; - $file = $config['upload_path'] . 'lotwreport_download.adi'; + $file = $config['upload_path'] . 'lotwreport_download_'.$sync_user_id.'_auto.adi'; if (file_exists($file) && ! is_writable($file)) { $result = "Temporary download file ".$file." is not writable. Aborting!"; continue; @@ -736,7 +736,7 @@ class Lotw extends CI_Controller { $this->load->model('logbook_model'); if (($this->input->post('lotwimport') == 'fetch') && (!($this->config->item('disable_manual_lotw')))) { - $file = $config['upload_path'] . 'lotwreport_download.adi'; + $file = $config['upload_path'] . 'lotwreport_download_'.$this->session->userdata('user_id').'.adi'; // Get credentials for LoTW $query = $this->user_model->get_by_id($this->session->userdata('user_id'));