Commit 60d59c0b authored by rswindell's avatar rswindell
Browse files

When uploading a file, if no description is given, use the filename

(rather than "No description given") if the real filename is different than
the one in the database (e.g. it's a long filename).
parent 30ea3658
......@@ -199,8 +199,12 @@ bool sbbs_t::uploadfile(file_t *f)
f->opencount=0;
strcpy(f->uler,useron.alias);
bprintf(text[FileNBytesReceived],f->name,ultoac(length,tmp));
if(!f->desc[0])
sprintf(f->desc,"%.*s",LEN_FDESC,text[NoDescription]);
if(!f->desc[0]) {
if(stricmp(f->name,getfname(path)))
SAFECOPY(f->desc,getfname(path));
else
sprintf(f->desc,"%.*s",LEN_FDESC,text[NoDescription]);
}
if(!addfiledat(&cfg,f))
return(0);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment