]> git.lyx.org Git - lyx.git/blobdiff - src/support/rename.C
remove unused stuff
[lyx.git] / src / support / rename.C
index e84e486fee272dc5425d8519b4ab7630d45910b9..33045adbaae3c94bdfe033d75a6625d459d91719 100644 (file)
 #include <config.h>
 
 #include "support/lyxlib.h"
+#include "support/filename.h"
 
 #include <cstdio>
 
 
+namespace lyx {
+namespace support {
+
+
 using std::string;
 
 
-bool lyx::support::rename(string const & from, string const & to)
+bool rename(FileName const & from, FileName const & to)
 {
-       if (::rename(from.c_str(), to.c_str()) == -1)
+       if (::rename(from.toFilesystemEncoding().c_str(), to.toFilesystemEncoding().c_str()) == -1)
                if (copy(from, to)) {
                        unlink(from);
                        return true;
@@ -28,3 +33,7 @@ bool lyx::support::rename(string const & from, string const & to)
                        return false;
        return true;
 }
+
+
+} // namespace support
+} // namespace lyx