From 5fdf8f0fddbcc5016c033af81a2481e37eb285e6 Mon Sep 17 00:00:00 2001
From: Rob Swindell <rob@synchro.net>
Date: Mon, 30 Jan 2023 15:58:22 -0800
Subject: [PATCH] Don't MQTT-publish the download of temp files

---
 src/sbbs3/ftpsrvr.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/sbbs3/ftpsrvr.c b/src/sbbs3/ftpsrvr.c
index 076d457773..83ec882c3a 100644
--- a/src/sbbs3/ftpsrvr.c
+++ b/src/sbbs3/ftpsrvr.c
@@ -827,7 +827,8 @@ static void send_thread(void* arg)
 			if(!xfer.tmpfile && !xfer.delfile && !(scfg.dir[f.dir]->misc&DIR_NOSTAT))
 				inc_download_stats(&scfg, 1, (ulong)total);
 
-			mqtt_file_download(&mqtt, xfer.user, &f, total, xfer.client);
+			if(!xfer.tmpfile)
+				mqtt_file_download(&mqtt, xfer.user, &f, total, xfer.client);
 		}
 
 		if(xfer.credits) {
-- 
GitLab