I have this macro that I wrote for changing the current directory to the project working directory:
_command cdp() name_info(','VSARG2_CMDLINE)
{
cd('+p +a ' :+ _ProjectGet_WorkingDir(_ProjectHandle()))
}
The problem is that this frequently fails because _ProjectGet_WorkingDir() returns a path that is relative to the location of the .vpw file. How can I convert this path to an absolute one, so that the cd() command always works?
I thought maybe I could first do a cd() to the path where the .vpw file is, but I don't know how to obtain the absolute path of that file either.