* fixed stuffextract for textures with dot in directory name

* fixed Shared project file under VC9
This commit is contained in:
bluma4862 2008-04-07 17:29:43 +00:00
parent efe5a1428b
commit 8afbb6de47
3 changed files with 13 additions and 7 deletions

Binary file not shown.

View File

@ -198,6 +198,14 @@
RelativePath=".\shared\log.h" RelativePath=".\shared\log.h"
> >
</File> </File>
<File
RelativePath=".\shared\ProgressBar.cpp"
>
</File>
<File
RelativePath=".\shared\ProgressBar.h"
>
</File>
<File <File
RelativePath=".\shared\SysDefs.h" RelativePath=".\shared\SysDefs.h"
> >

View File

@ -712,20 +712,18 @@ void ExtractMapDependencies(void)
continue; continue;
// prepare lowercased and "underlined" path for file // prepare lowercased and "underlined" path for file
std::string copy = mpqfn; std::string copy = NormalizeFilename(mpqfn);
std::transform(copy.begin(), copy.end(), copy.begin(), ::tolower); if (copy.find_first_of("/") != std::string::npos)
std::transform(copy.begin(), copy.end(), copy.begin(), replaceSpaces);
if (copy.find_first_of("/\\") != std::string::npos)
{ {
std::string copy2 = copy; std::string copy2 = copy;
char* tok = strtok((char*)copy2.c_str(),"/\\"); char* tok = strtok((char*)copy2.c_str(),"/");
std::string fullpath = pathtex; std::string fullpath = pathtex;
while (tok && !strstr(tok, ".")) while (tok && !strstr(tok, ".blp"))
{ {
fullpath += "/"; fullpath += "/";
fullpath += tok; fullpath += tok;
CreateDir(fullpath.c_str()); CreateDir(fullpath.c_str());
tok = strtok(NULL, "/\\"); tok = strtok(NULL, "/");
} }
} }