3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
6 * \author Lars Gullik Bjønnes
8 * Full author contact details are available in file CREDITS.
13 // Needed to prevent the definition of the unnamed_PathChanger macro
14 // in the header file.
18 #include "support/Path.h"
19 #include "support/lyxlib.h"
25 PathChanger::PathChanger(FileName const & path)
29 pushedDir_ = getcwd();
31 if (pushedDir_.empty() || !path.chdir()) {
40 PathChanger::~PathChanger()
47 int PathChanger::pop()
50 // should throw an exception
51 // throw logical_error();
55 if (!pushedDir_.chdir()) {
56 // should throw an exception
57 // throw DirChangeError();
64 } // namespace support