]> git.lyx.org Git - lyx.git/blobdiff - src/support/getcwd.C
* src/LaTeX.C (deplog): fix the regex to parse filenames in the log file
[lyx.git] / src / support / getcwd.C
index 40b61a6a2609410f5e9e394ad683d5c580551182..1a0c3f213f5ea2826d53de0682603835dd847dc0 100644 (file)
 #include <config.h>
 
 #include "support/lyxlib.h"
+#include "support/os.h"
 
 #include <boost/scoped_array.hpp>
 
 #include <cerrno>
 
-
-namespace lyx {
 #ifdef HAVE_UNISTD_H
 # include <unistd.h>
 #endif
@@ -31,6 +30,9 @@ using boost::scoped_array;
 using std::string;
 
 
+namespace lyx {
+namespace support {
+
 namespace {
 
 inline
@@ -48,7 +50,7 @@ char * l_getcwd(char * buffer, size_t size)
 
 
 // Returns current working directory
-string const lyx::support::getcwd()
+FileName const getcwd()
 {
        int n = 256;    // Assume path is less than 256 chars
        char * err;
@@ -64,8 +66,8 @@ string const lyx::support::getcwd()
        string result;
        if (err)
                result = tbuf.get();
-       return result;
+       return FileName(os::internal_path(to_utf8(from_filesystem8bit(result))));
 }
 
-
+} // namespace support
 } // namespace lyx