Skip to content

Commit

Permalink
Fixed TestFilesystem.testFindFiles() on appveyor (again)
Browse files Browse the repository at this point in the history
  • Loading branch information
end2endzone committed May 19, 2018
1 parent 3d23b2d commit ea6e27b
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion test/TestFilesystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,15 @@ namespace ra { namespace filesystem { namespace test

//search for the last (almost) folder of the root file system.
#ifdef _WIN32
const std::string pattern = environment::getEnvironmentVariable("windir"); //returns C:\Windows
//fix for appveyor
std::string windir = environment::getEnvironmentVariable("windir"); //returns C:\Windows
if (ra::gtesthelp::isAppVeyor() && windir == "C:\\windows")
{
//fix for appveyor which has 'windir' defined as 'C:\windows' instead of 'C:\Windows'.
windir = "C:\\Windows";
}

const std::string pattern = windir;
#else
const std::string pattern = "/var";
#endif
Expand Down

0 comments on commit ea6e27b

Please sign in to comment.