|
|
|
@ -147,10 +147,8 @@ void readFormId( string& outputFileName )
|
|
|
|
|
{
|
|
|
|
|
// get the file type from form name
|
|
|
|
|
TFormId fid = (*itIF).first;
|
|
|
|
|
string fileType;
|
|
|
|
|
bool fileTypeGet = getFileType((*itIF).second, fileType);
|
|
|
|
|
|
|
|
|
|
if((*itIF).second.empty() || (*itIF).second=="." || (*itIF).second==".." || ((*itIF).second[0]=='_' && fileType != "sound") || (*itIF).second.find(".#")==0)
|
|
|
|
|
if ((*itIF).second.empty() || (*itIF).second=="." || (*itIF).second==".." || (*itIF).second[0]=='_' || (*itIF).second.find(".#")==0)
|
|
|
|
|
{
|
|
|
|
|
map<TFormId,string>::iterator itErase = itIF;
|
|
|
|
|
++itIF;
|
|
|
|
@ -158,7 +156,8 @@ void readFormId( string& outputFileName )
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
if(fileTypeGet)
|
|
|
|
|
string fileType;
|
|
|
|
|
if (getFileType((*itIF).second, fileType))
|
|
|
|
|
{
|
|
|
|
|
// insert the association (file type/file type id)
|
|
|
|
|
map<string,uint8>::iterator itFT = FileTypeToId.find(fileType);
|
|
|
|
@ -294,8 +293,7 @@ void makeId( list<string>& dirs )
|
|
|
|
|
//-----------------------------------------------
|
|
|
|
|
void addId( string fileName )
|
|
|
|
|
{
|
|
|
|
|
string extStr = CFile::getExtension( fileName );
|
|
|
|
|
if(fileName.empty() || fileName=="." || fileName==".." || (fileName[0]=='_' && extStr != "sound") || fileName.find(".#")==0)
|
|
|
|
|
if (fileName.empty() || fileName == "." || fileName == ".." || fileName[0] == '_' || fileName.find(".#") == 0)
|
|
|
|
|
{
|
|
|
|
|
// nlinfo("Discarding file '%s'", fileName.c_str());
|
|
|
|
|
NbFilesDiscarded++;
|
|
|
|
@ -305,6 +303,7 @@ void addId( string fileName )
|
|
|
|
|
{
|
|
|
|
|
if (!ExtensionsAllowed.empty())
|
|
|
|
|
{
|
|
|
|
|
string extStr = CFile::getExtension(fileName);
|
|
|
|
|
if (ExtensionsAllowed.find(extStr) == ExtensionsAllowed.end())
|
|
|
|
|
{
|
|
|
|
|
NbFilesDiscarded++;
|
|
|
|
|