From d6293e05bccdff9ff8fbb1c8cff38a6077491aff Mon Sep 17 00:00:00 2001
From: "Rob Swindell (on Windows 11)" <rob@synchro.net>
Date: Mon, 18 Mar 2024 20:56:17 -0700
Subject: [PATCH] Fix logic to add the "partially" prefix to download
 notification messages

The file_t struct may not have the size of the file pre-poulated, so we needed
to call getfilesize() here.
---
 src/sbbs3/userdat.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/sbbs3/userdat.c b/src/sbbs3/userdat.c
index 8f78ece0b9..5af9935d58 100644
--- a/src/sbbs3/userdat.c
+++ b/src/sbbs3/userdat.c
@@ -2899,7 +2899,7 @@ bool user_downloaded_file(scfg_t* cfg, user_t* user, client_t* client,
 					SAFEPRINTF2(username,"%s [%s]", alias, client->addr);
 			} else
 				SAFECOPY(username, alias);
-			if(strcmp(cfg->dir[dirnum]->code, "TEMP") == 0 || bytes < f.size)
+			if(strcmp(cfg->dir[dirnum]->code, "TEMP") == 0 || bytes < getfilesize(cfg, &f))
 				SAFECOPY(prefix, cfg->text[Partially]);
 			if(client != NULL) {
 				SAFECAT(prefix, client->protocol);
-- 
GitLab