]> 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 c1aaa6eac79614c3e8359a439245e336cb99aa8d..1a0c3f213f5ea2826d53de0682603835dd847dc0 100644 (file)
@@ -17,8 +17,6 @@
 
 #include <cerrno>
 
-
-namespace lyx {
 #ifdef HAVE_UNISTD_H
 # include <unistd.h>
 #endif
@@ -28,11 +26,13 @@ namespace lyx {
 #endif
 
 using boost::scoped_array;
-using support::os::internal_path;
 
 using std::string;
 
 
+namespace lyx {
+namespace support {
+
 namespace {
 
 inline
@@ -50,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;
@@ -66,8 +66,8 @@ string const lyx::support::getcwd()
        string result;
        if (err)
                result = tbuf.get();
-       return internal_path(result);
+       return FileName(os::internal_path(to_utf8(from_filesystem8bit(result))));
 }
 
-
+} // namespace support
 } // namespace lyx