3
Vote

Running with the toolbar changes the working directory

description

I am using VS 2010, and trying to read files using relative paths like so:
 
FIleReader::Read ("Configuration\somefile.dat");
 
If I run the gtest program directly, this works fine, as the current directory is along the lines of c:\dev\myproject
 
If I run the gtest program using this addin, the current directory is changed to c:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE
 
causing the code to fail.
 
I verified that the current directory is changing by putting the following code in a google test:
 
char path [5000];
size_t size = 5000;
getcwd(path,size);
std::cout<<"\n current Path"<<path << "\n\n";

comments

sakthiyuvaraj wrote Oct 24, 2013 at 1:39 PM

Is there a fix for this problem?