Does not understand . as current folder (Trac #4)
This commit is contained in:
parent
f6452e3613
commit
bfc82f29eb
|
@ -157,11 +157,19 @@ void FileLister::RecursiveAddFiles(std::vector<std::string> &filenames, const st
|
|||
{
|
||||
std::ostringstream bdir, oss;
|
||||
oss << path;
|
||||
if (path.length() > 0 && path[path.length()-1] == '/')
|
||||
if (path.length() > 0)
|
||||
{
|
||||
// Windows doesn't recognize "." as current folder by default
|
||||
if (path == ".")
|
||||
{
|
||||
oss << "/*";
|
||||
}
|
||||
else if (path[path.length() - 1] == '/')
|
||||
{
|
||||
bdir << path;
|
||||
oss << "*";
|
||||
}
|
||||
}
|
||||
|
||||
WIN32_FIND_DATA ffd;
|
||||
HANDLE hFind = FindFirstFile(oss.str().c_str(), &ffd);
|
||||
|
|
Loading…
Reference in New Issue