Skip to content
Snippets Groups Projects
Commit 9f9b56fb authored by rswindell's avatar rswindell
Browse files

No longer tries to add directory entries as files to the database (whoops).

Win32 build uses mangled short filenames for database entries.
parent 041eff02
No related branches found
No related tags found
No related merge requests found
......@@ -215,11 +215,18 @@ void addlist(char *inpath, file_t f, uint dskip, uint sskip)
dir=opendir(str);
while(dir!=NULL && (dirent=readdir(dir))!=NULL) {
sprintf(filepath,"%s%s",str,dirent->d_name);
sprintf(tmp,"%s%s",str,dirent->d_name);
if(isdir(tmp))
continue;
#ifdef _WIN32
GetShortPathName(tmp, filepath, sizeof(filepath));
#else
strcpy(filepath,tmp);
#endif
f.misc=0;
f.desc[0]=0;
f.cdt=flength(filepath);
padfname(dirent->d_name,f.name);
padfname(getfname(filepath),f.name);
printf("%s %10lu %s\n"
,f.name,f.cdt,unixtodstr(&scfg,fdate(filepath),str));
exist=findfile(&scfg,f.dir,f.name);
......
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