Skip to content
Snippets Groups Projects
Commit d6293e05 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

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.
parent 64709030
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment