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: https://zerowing.idsoftware.com/svn/radiant/GtkRadiant/trunk@346
8a3a26a2-13c4-0310-b231-
cf6edde360e5
#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;
}