From 85e901d21f07d31539399a175faf00c97c0604f4 Mon Sep 17 00:00:00 2001 From: rswindell <> Date: Tue, 11 May 2004 22:20:15 +0000 Subject: [PATCH] Using fexistcase() to get/display long filename on Win32. --- src/sbbs3/listfile.cpp | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/src/sbbs3/listfile.cpp b/src/sbbs3/listfile.cpp index 2087dd888c..8ce56bc6ec 100644 --- a/src/sbbs3/listfile.cpp +++ b/src/sbbs3/listfile.cpp @@ -440,20 +440,14 @@ bool sbbs_t::listfile(char *fname, char HUGE16 *buf, uint dirnum #ifdef _WIN32 if(exist && !(cfg.file_misc&FM_NO_LFN)) { - - WIN32_FIND_DATA finddata; - HANDLE h=FindFirstFile(path,&finddata); - - if(h!=INVALID_HANDLE_VALUE) { - - if(stricmp(finddata.cFileName,fname) && stricmp(finddata.cFileName,str)) - bprintf("%.*s\r\n%21s",LEN_FDESC,finddata.cFileName,""); - - FindClose(h); - } + fexistcase(path); /* Get real (long?) filename */ + ptr=getfname(path); + if(stricmp(ptr,fname) && stricmp(ptr,str)) + bprintf("%.*s\r\n%21s",LEN_FDESC,ptr,""); } #endif + if(!ext[0]) { if(search[0]) { /* high-light string in string */ strcpy(tmp,str); -- GitLab