From 62c6ae76605ecb54f266f345470ad75d7a681df8 Mon Sep 17 00:00:00 2001 From: Gacko Date: Sat, 2 Nov 2013 14:05:17 +0100 Subject: [PATCH] Tools: Skip extracting already existing DBC files Thanks to MacWarrior, closes #11061 --- src/tools/map_extractor/System.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/tools/map_extractor/System.cpp b/src/tools/map_extractor/System.cpp index 43b4b57c17..3dd311c2da 100644 --- a/src/tools/map_extractor/System.cpp +++ b/src/tools/map_extractor/System.cpp @@ -107,6 +107,12 @@ static const char* const langs[] = {"enGB", "enUS", "deDE", "esES", "frFR", "koK void CreateDir( const std::string& Path ) { + if(chdir(Path.c_str()) == 0) + { + chdir("../"); + return; + } + int ret; #ifdef _WIN32 ret = _mkdir( Path.c_str()); @@ -1046,6 +1052,9 @@ void ExtractDBCFiles(int locale, bool basicLocale) { string filename = path; filename += (iter->c_str() + strlen("DBFilesClient\\")); + + if(FileExists(filename.c_str())) + continue; if (ExtractFile(iter->c_str(), filename)) ++count;