6 #include "support/filetools.h"
17 Path(string const & path)
21 pushedDir_ = GetCWD();
22 if (pushedDir_.empty() || lyx::chdir(path.c_str())) {
23 // should throw an exception
24 // throw DirChangeError();
25 // The use of WriteFSAlert makes this
26 // impossible to inline.
27 //WriteFSAlert(_("Error: Could not change to directory: "),
48 // To avoid the wrong usage:
49 // Path("/tmp"); // wrong
50 // Path p("/tmp"); // right
52 #define Path(x) unnamed_Path;
53 // Tip gotten from Bobby Schmidt's column in C/C++ Users Journal