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

Make user_downloaded_file() tolerant of being passed a file path

... instead of just the file name, as was expected.
parent 218d51ec
No related branches found
No related tags found
No related merge requests found
......@@ -2842,6 +2842,7 @@ bool user_downloaded_file(scfg_t* cfg, user_t* user, client_t* client,
file_t f;
bool removed = false;
filename = getfname(filename);
if(!loadfile(cfg, dirnum, filename, &f, file_detail_normal))
return false;
......@@ -2911,12 +2912,12 @@ bool user_downloaded_file(scfg_t* cfg, user_t* user, client_t* client,
/* Inform uploader of downloaded file */
if(mod == 0)
SAFEPRINTF3(str, cfg->text[FreeDownloadUserMsg]
,getfname(filename)
,filename
,prefix
,username);
else
SAFEPRINTF4(str, cfg->text[DownloadUserMsg]
,getfname(filename)
,filename
,prefix
,username, tmp);
putsmsg(cfg, uploader.number, str);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment