diff options
Diffstat (limited to 'wsutil')
-rw-r--r-- | wsutil/file_util.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/wsutil/file_util.c b/wsutil/file_util.c index 4e46131fa6..d145752c83 100644 --- a/wsutil/file_util.c +++ b/wsutil/file_util.c @@ -249,7 +249,6 @@ ws_stdio_stat (const gchar *filename, errno = save_errno; return retval; } - /** * g_unlink: * @filename: a pathname in the GLib file name encoding (UTF-8 on Windows) @@ -268,23 +267,24 @@ ws_stdio_stat (const gchar *filename, * * Since: 2.6 */ + int ws_stdio_unlink (const gchar *filename) { - gchar *cp_filename = g_locale_from_utf8 (filename, -1, NULL, NULL, NULL); + wchar_t *wfilename = g_utf8_to_utf16 (filename, -1, NULL, NULL, NULL); int retval; int save_errno; - if (cp_filename == NULL) + if (wfilename == NULL) { errno = EINVAL; return -1; } - retval = unlink (cp_filename); + retval = _wunlink (wfilename); save_errno = errno; - g_free (cp_filename); + g_free (wfilename); errno = save_errno; return retval; |