Skip to content
Snippets Groups Projects
Commit 6d6925b3 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
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
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #2592 passed
...@@ -340,10 +340,18 @@ bool sbbs_t::listfile(file_t* f, uint dirnum, const char *search, const char let ...@@ -340,10 +340,18 @@ bool sbbs_t::listfile(file_t* f, uint dirnum, const char *search, const char let
off_t cdt; off_t cdt;
int size_attr=clr_filecdt; int size_attr=clr_filecdt;
if(f->extdesc != NULL && *f->extdesc && (useron.misc&EXTDESC)) { if(useron.misc & EXTDESC) {
ext = f->extdesc; if(f->extdesc != NULL && (ext = strdup(f->extdesc)) != NULL) {
if((useron.misc&BATCHFLAG) && lncntr+extdesclines(ext)>=rows-2 && letter!='A') strip_ctrl(ext, ext);
return false; 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(); cond_newline();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment