]> git.lyx.org Git - lyx.git/blobdiff - src/support/unlink.C
* src/text2.C: deleteEmptyParagraphMechanism(): fix a crash in
[lyx.git] / src / support / unlink.C
index ebdd20eabfb28e88a84b6d797702d7c7f0030e70..a8ebc138d8b8ccb64b27ccee77000f3796dceef8 100644 (file)
 #include <config.h>
 
 #include "support/lyxlib.h"
-
-
-namespace lyx {
+#include "support/filename.h"
 
 #ifdef HAVE_UNISTD_H
 # include <unistd.h>
 #endif
 
-int lyx::support::unlink(std::string const & pathname)
+namespace lyx {
+namespace support {
+
+int unlink(FileName const & pathname)
 {
-       return ::unlink(pathname.c_str());
+       return ::unlink(pathname.toFilesystemEncoding().c_str());
 }
 
 
+} // namespace support
 } // namespace lyx