diff --git a/code/nel/tools/misc/bnp_make/main.cpp b/code/nel/tools/misc/bnp_make/main.cpp index edab782b0..98ddf84d6 100644 --- a/code/nel/tools/misc/bnp_make/main.cpp +++ b/code/nel/tools/misc/bnp_make/main.cpp @@ -92,22 +92,32 @@ void packSubRecurse(const std::string &srcDirectory) printf ("Treating directory: %s\n", srcDirectory.c_str()); CPath::getPathContent(srcDirectory, true, false, true, pathContent); - // TODO: remove duplicate files + if (pathContent.empty()) return; // Sort filename sort (pathContent.begin(), pathContent.end(), i_comp); + // check for files with same name + for(uint i = 1, len = pathContent.size(); i < len; ++i) + { + if (toLower(CFile::getFilename(pathContent[i-1])) == toLower(CFile::getFilename(pathContent[i]))) + { + nlerror("File %s is not unique in BNP!", CFile::getFilename(pathContent[i]).c_str()); + return; + } + } + for (uint i=0; i