From 46c1a01308e569d0d09a69988f8f5286ee75882e Mon Sep 17 00:00:00 2001
From: Rob Swindell <rob@synchro.net>
Date: Tue, 27 Apr 2021 12:38:37 -0700
Subject: [PATCH] Search of word in descriptions should match filenames too.

Especially now that now all files even have descriptions (e.g. when super long filenames suffice).
---
 src/sbbs3/listfile.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/sbbs3/listfile.cpp b/src/sbbs3/listfile.cpp
index 39f937cda4..b8a7eb4d82 100644
--- a/src/sbbs3/listfile.cpp
+++ b/src/sbbs3/listfile.cpp
@@ -146,6 +146,8 @@ int sbbs_t::listfiles(uint dirnum, const char *filespec, FILE* tofile, long mode
 #endif
 		if(mode&(FL_FINDDESC|FL_EXFIND)) {
 			p = (f->desc == NULL) ? NULL : strcasestr(f->desc, filespec);
+			if(p == NULL)
+				p = strcasestr(f->name, filespec);
 			if(!(mode&FL_EXFIND) && p==NULL) {
 				m++;
 				continue; 
-- 
GitLab