2000-04-04 00:19:15 +00:00
|
|
|
#include <config.h>
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma implementation
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "path.h"
|
|
|
|
|
|
|
|
int Path::pop()
|
|
|
|
{
|
|
|
|
if (popped_) {
|
|
|
|
// should throw an exception
|
|
|
|
// throw logical_error();
|
|
|
|
// The use of WriteFSAlerrt makes this impossible
|
|
|
|
// to inline.
|
2001-11-26 10:19:58 +00:00
|
|
|
//Alert::err_alert(_("Error: Dir already popped: "),
|
2000-04-04 00:19:15 +00:00
|
|
|
// pushedDir_);
|
|
|
|
return 0;
|
|
|
|
}
|
2000-09-26 13:54:57 +00:00
|
|
|
if (lyx::chdir(pushedDir_)) {
|
2000-04-04 00:19:15 +00:00
|
|
|
// should throw an exception
|
|
|
|
// throw DirChangeError();
|
2001-11-26 10:19:58 +00:00
|
|
|
// The use of Alert::err_alert makes this impossible
|
2000-04-04 00:19:15 +00:00
|
|
|
// to inline.
|
2001-11-26 10:19:58 +00:00
|
|
|
//Alert::err_alert(
|
2002-03-21 17:09:55 +00:00
|
|
|
// _("Error: Could not change to directory: "),
|
2000-04-04 00:19:15 +00:00
|
|
|
// pushedDir_);
|
|
|
|
}
|
|
|
|
popped_ = true;
|
|
|
|
return 0;
|
|
|
|
}
|