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