Commit 6d6925b3 authored by Rob Swindell's avatar Rob Swindell 💬
Browse files

Don't display "blank" extended description in listings

If an extended description contains nothing but Ctrl-A codes and white-space, don't display it in a file listing (in place of the normal short description).
parent 8df9adb1
Pipeline #2592 passed with stage
in 9 minutes and 49 seconds
......@@ -340,10 +340,18 @@ bool sbbs_t::listfile(file_t* f, uint dirnum, const char *search, const char let
off_t cdt;
int size_attr=clr_filecdt;
if(f->extdesc != NULL && *f->extdesc && (useron.misc&EXTDESC)) {
ext = f->extdesc;
if((useron.misc&BATCHFLAG) && lncntr+extdesclines(ext)>=rows-2 && letter!='A')
return false;
if(useron.misc & EXTDESC) {
if(f->extdesc != NULL && (ext = strdup(f->extdesc)) != NULL) {
strip_ctrl(ext, ext);
truncsp(ext);
char ch = *ext;
FREE_AND_NULL(ext);
if(ch != '\0') {
ext = f->extdesc;
if((useron.misc&BATCHFLAG) && lncntr+extdesclines(ext)>=rows-2 && letter!='A')
return false;
}
}
}
cond_newline();
......
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