]> 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 ef3b52033269429a3aaab2e34f59789c42133739..a8ebc138d8b8ccb64b27ccee77000f3796dceef8 100644 (file)
@@ -1,10 +1,30 @@
+/**
+ * \file unlink.C
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
+ *
+ * \author Lars Gullik Bjønnes
+ *
+ * Full author contact details are available in file CREDITS.
+ */
+
 #include <config.h>
 
-#include <unistd.h>
+#include "support/lyxlib.h"
+#include "support/filename.h"
+
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
 
-#include "lyxlib.h"
+namespace lyx {
+namespace support {
 
-int lyx::unlink(string const & pathname)
+int unlink(FileName const & pathname)
 {
-       return ::unlink(pathname.c_str());
+       return ::unlink(pathname.toFilesystemEncoding().c_str());
 }
+
+
+} // namespace support
+} // namespace lyx