ixing a big problem on Windows platforms that has to do with copying over

game packs to the game install directory.  Before this patch, users of
Radiant	weren't	able to	start Radiant without doing some manual	copying	of
game pack files over by hand (and	I'm sure nobody	figured	that out).
The problem is in radiant/missing.cpp. 	CopyTree() didn't correctly recursively
copy directories because of a problem in FindFiles::FindFiles() on Windows.


git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@346 8a3a26a2-13c4-0310-b231-cf6edde360e5
This commit is contained in:
rambetter 2010-12-13 04:50:40 +00:00
parent 7c46911658
commit eb77a1bc39

View file

@ -168,7 +168,17 @@ const char* FindFiles::NextFile() {
#else
FindFiles::FindFiles( const char *_directory ) {
char endChar;
directory = _directory;
if (directory.GetLength() > 0) {
endChar = directory.GetAt(directory.GetLength() - 1);
if (!(endChar == '/' || endChar == '\\')) {
// We're only using '/' as the path separator throughout this code, not '\'.
// However, I'd hate to see the code silently fail due to a trailing '\', so
// I added the check for it.
directory += '/';
}
}
directory += '*';
findHandle = INVALID_HANDLE_VALUE;
}