]> git.lyx.org Git - lyx.git/blobdiff - src/support/getcwd.C
fix compiler warnings about unused parameter
[lyx.git] / src / support / getcwd.C
index 47f3446e81b9a2c11a46930fe778b176eb208308..1a0c3f213f5ea2826d53de0682603835dd847dc0 100644 (file)
 #include <config.h>
 
 #include "support/lyxlib.h"
+#include "support/os.h"
 
 #include <boost/scoped_array.hpp>
 
 #include <cerrno>
+
 #ifdef HAVE_UNISTD_H
 # include <unistd.h>
 #endif
@@ -28,6 +30,9 @@ using boost::scoped_array;
 using std::string;
 
 
+namespace lyx {
+namespace support {
+
 namespace {
 
 inline
@@ -45,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;
@@ -61,5 +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