Skip to content
Snippets Groups Projects
Commit 893756a7 authored by rswindell's avatar rswindell
Browse files

Bugfix: in batch_upload(), if a file with a long filename was blind uploaded

(e.g. with SEXYZ or RZ), then it would not be properly added to the database
(but the file would be copied to the destination directory).
parent 9ffef0f7
No related branches found
No related tags found
No related merge requests found
......@@ -584,8 +584,9 @@ bool sbbs_t::create_bimodem_pth()
/****************************************************************************/
void sbbs_t::batch_upload()
{
char str1[256],str2[256];
char tmp[512];
char str1[MAX_PATH+1],str2[MAX_PATH+1];
char path[MAX_PATH+1];
char tmp[MAX_PATH+1];
uint i,j,x,y;
file_t f;
DIR* dir;
......@@ -631,7 +632,13 @@ void sbbs_t::batch_upload()
continue;
memset(&f,0,sizeof(file_t));
f.dir=cfg.upload_dir;
padfname(dirent->d_name,f.name);
SAFECOPY(path,str1);
#ifdef _WIN32
GetShortPathName(str1, path, sizeof(path));
#endif
padfname(getfname(path),f.name);
for(x=0;x<usrlibs;x++) {
for(y=0;y<usrdirs[x];y++)
if(cfg.dir[usrdir[x][y]]->misc&DIR_DUPES
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment