]> git.lyx.org Git - lyx.git/blobdiff - src/support/path.h
fix typo that put too many include paths for most people
[lyx.git] / src / support / path.h
index 2a2dc0b2161c7695420f4de61de0d920df443181..7059b1a285d325c9def93a6388612889e6dd3582 100644 (file)
@@ -3,29 +3,30 @@
 #define PATH_H
 
 #include "LString.h"
-#include "support/filetools.h"
+//#include "filetools.h"
 #include "lyxlib.h"
+#include <boost/utility.hpp>
 
 #ifdef __GNUG__
 #pragma interface
 #endif
 
 ///
-class Path {
+class Path : boost::noncopyable {
 public:
        ///
        explicit
        Path(string const & path)
                : popped_(false)
        {
-               if (!path.empty()) { 
-                       pushedDir_ = GetCWD();
-                       if (pushedDir_.empty() || lyx::chdir(path.c_str())) {
+               if (!path.empty()) {
+                       pushedDir_ = lyx::getcwd(); // GetCWD();
+                       if (pushedDir_.empty() || lyx::chdir(path)) {
                                // should throw an exception
                                // throw DirChangeError();
-                               // The use of WriteFSAlert makes this
+                               // The use of Alert::err_alert makes this
                                // impossible to inline.
-                               //WriteFSAlert(_("Error: Could not change to directory: "), 
+                               //Alert::err_alert(_("Error: Could not change to directory: "),
                                //           path);
                        }
                } else {
@@ -50,6 +51,7 @@ private:
 // Path("/tmp");   // wrong
 // Path p("/tmp");  // right
 // we add this macro:
+///
 #define Path(x) unnamed_Path;
 // Tip gotten from Bobby Schmidt's column in C/C++ Users Journal