Does not understand . as current folder (Trac #4)

This commit is contained in:
Kimmo Varis 2009-01-17 19:34:11 +00:00
parent f6452e3613
commit bfc82f29eb
1 changed files with 11 additions and 3 deletions

View File

@ -157,10 +157,18 @@ void FileLister::RecursiveAddFiles(std::vector<std::string> &filenames, const st
{ {
std::ostringstream bdir, oss; std::ostringstream bdir, oss;
oss << path; oss << path;
if (path.length() > 0 && path[path.length()-1] == '/') if (path.length() > 0)
{ {
bdir << path; // Windows doesn't recognize "." as current folder by default
oss << "*"; if (path == ".")
{
oss << "/*";
}
else if (path[path.length() - 1] == '/')
{
bdir << path;
oss << "*";
}
} }
WIN32_FIND_DATA ffd; WIN32_FIND_DATA ffd;