2002-05-30 02:24:33 +00:00
|
|
|
|
/**
|
|
|
|
|
* \file path.C
|
2002-09-25 10:03:41 +00:00
|
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
|
* Licence details can be found in the file COPYING.
|
2002-05-30 02:24:33 +00:00
|
|
|
|
*
|
2002-09-25 10:03:41 +00:00
|
|
|
|
* \author Lars Gullik Bj<EFBFBD>nnes
|
|
|
|
|
*
|
2003-08-23 00:17:00 +00:00
|
|
|
|
* Full author contact details are available in file CREDITS.
|
2002-05-30 02:24:33 +00:00
|
|
|
|
*/
|
|
|
|
|
|
2000-04-04 00:19:15 +00:00
|
|
|
|
#include <config.h>
|
|
|
|
|
|
|
|
|
|
#include "path.h"
|
|
|
|
|
|
2003-06-30 23:56:22 +00:00
|
|
|
|
namespace lyx {
|
|
|
|
|
namespace support {
|
|
|
|
|
|
2000-04-04 00:19:15 +00:00
|
|
|
|
int Path::pop()
|
|
|
|
|
{
|
|
|
|
|
if (popped_) {
|
|
|
|
|
// should throw an exception
|
|
|
|
|
// throw logical_error();
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
2002-09-25 10:03:41 +00:00
|
|
|
|
|
2003-06-30 23:56:22 +00:00
|
|
|
|
if (chdir(pushedDir_)) {
|
2000-04-04 00:19:15 +00:00
|
|
|
|
// should throw an exception
|
|
|
|
|
// throw DirChangeError();
|
|
|
|
|
}
|
|
|
|
|
popped_ = true;
|
2002-09-25 10:03:41 +00:00
|
|
|
|
|
2000-04-04 00:19:15 +00:00
|
|
|
|
return 0;
|
|
|
|
|
}
|
2003-06-30 23:56:22 +00:00
|
|
|
|
|
|
|
|
|
} // namespace support
|
|
|
|
|
} // namespace lyx
|