#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