]> git.lyx.org Git - lyx.git/blobdiff - src/support/path.h
lyx-devel.diff
[lyx.git] / src / support / path.h
index e2e99085430bd2397ea92aaff7c90b15834a275e..9e8f67ba8e10c83ab21b587313724c8fc49541fd 100644 (file)
@@ -3,23 +3,25 @@
 #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 : public noncopyable {
 public:
        ///
+       explicit
        Path(string const & path)
                : popped_(false)
        {
                if (!path.empty()) { 
-                       pushedDir_ = GetCWD();
-                       if (pushedDir_.empty() || lyx::chdir(path.c_str())) {
+                       pushedDir_ = lyx::getcwd(); // GetCWD();
+                       if (pushedDir_.empty() || lyx::chdir(path)) {
                                // should throw an exception
                                // throw DirChangeError();
                                // The use of WriteFSAlert makes this
@@ -49,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