From d90412570774ba875066f6d4b0eb5b48fa4e7cd0 Mon Sep 17 00:00:00 2001
From: rswindell <>
Date: Wed, 14 Sep 2005 06:30:14 +0000
Subject: [PATCH] Bug-fix: when moving files using the 'R'emove/edit file
 prompt (sbbs_t:::listfileinfo), long filenames would be shortened to micros~1
 shortened filenames (on Win32 only). This bug was fixed by simply using the
 same movefile() function called from the batch flagging prompt
 (sbbs_t::batchflagprompt) ,where this bug was already fixed in v3.13a.

---
 src/sbbs3/listfile.cpp | 24 +-----------------------
 1 file changed, 1 insertion(+), 23 deletions(-)

diff --git a/src/sbbs3/listfile.cpp b/src/sbbs3/listfile.cpp
index 84bbf1a2a7..c76c270f2e 100644
--- a/src/sbbs3/listfile.cpp
+++ b/src/sbbs3/listfile.cpp
@@ -1153,29 +1153,7 @@ int sbbs_t::listfileinfo(uint dirnum, char *filespec, long mode)
 						j=usrdirs[i]-1;
 					else j--;
 					CRLF;
-					if(findfile(&cfg,usrdir[i][j],f.name)) {
-						bprintf(text[FileAlreadyThere],f.name);
-						break; }
-					getextdesc(&cfg,f.dir,f.datoffset,ext);
-					removefiledat(&cfg,&f);
-					if(f.dir==cfg.upload_dir || f.dir==cfg.sysop_dir)
-						f.dateuled=time(NULL);
-					f.dir=usrdir[i][j];
-					addfiledat(&cfg,&f);
-					bprintf(text[MovedFile],f.name
-						,cfg.lib[cfg.dir[f.dir]->lib]->sname,cfg.dir[f.dir]->sname);
-					sprintf(str,"%s moved %s to %s %s"
-						,useron.alias
-						,f.name
-						,cfg.lib[cfg.dir[f.dir]->lib]->sname,cfg.dir[f.dir]->sname);
-					logline(nulstr,str);
-					if(!f.altpath) {    /* move actual file */
-						sprintf(str,"%s%s",cfg.dir[dirnum]->path,fname);
-						if(fexistcase(str)) {
-							sprintf(path,"%s%s",cfg.dir[f.dir]->path,fname);
-							mv(str,path,0); } }
-					if(f.misc&FM_EXTDESC)
-						putextdesc(&cfg,f.dir,f.datoffset,ext);
+					movefile(&f,usrdir[i][j]);
 					break;
 				case 'Q':   /* quit */
 					found=-1;
-- 
GitLab