Commit 86fc22da authored by rswindell's avatar rswindell
Browse files

Since getfilepath() returns a case-corrected filename now, we need to do

other things to detect/display the actual filename (when different than
what's stored in the database).
parent cc38eeba
/* file.cpp */
/* Synchronet file transfer-related functions */
/* $Id$ */
// vi: tabstop=4
/****************************************************************************
* @format.tab-size 4 (Plain Text/Source Code File Header) *
......@@ -45,7 +44,7 @@ void sbbs_t::fileinfo(file_t* f)
char ext[513];
char tmp[512];
char path[MAX_PATH+1];
char fpath[MAX_PATH+1];
char fname[MAX_PATH+1];
uint i,j;
for(i=0;i<usrlibs;i++)
......@@ -58,11 +57,9 @@ void sbbs_t::fileinfo(file_t* f)
getfilepath(&cfg,f,path);
bprintf(text[FiLib],i+1,cfg.lib[cfg.dir[f->dir]->lib]->lname);
bprintf(text[FiDir],j+1,cfg.dir[f->dir]->lname);
bprintf(text[FiFilename],getfname(path));
SAFECOPY(fpath,path);
fexistcase(fpath);
if(strcmp(path,fpath) && strcmp(f->desc,getfname(fpath))) /* Different "actual" filename */
bprintf(text[FiFilename],getfname(fpath));
bprintf(text[FiFilename],unpadfname(f->name, fname));
if(strcmp(getfname(path),fname) && strcmp(f->desc,getfname(path))) /* Different "actual" filename */
bprintf(text[FiFilename],getfname(path));
if(f->size!=-1L)
bprintf(text[FiFileSize],ultoac(f->size,tmp));
......@@ -95,7 +92,7 @@ void sbbs_t::fileinfo(file_t* f)
if(f->size==-1L) {
bprintf(text[FileIsNotOnline],f->name);
if(SYSOP)
bprintf("%s\r\n",fpath);
bprintf("%s\r\n",path);
}
if(f->opencount)
bprintf(text[FileIsOpen],f->opencount,f->opencount>1 ? "s" : nulstr);
......
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