Mercurial > octave
changeset 25625:6fb384c855c1
Fix "unlink" for files with non-ASCII chars on Windows.
* unistd-wrappers.c (octave_unlink_wrapper): Use Unicode WinAPI function on
Windows.
author | Markus Mützel <markus.muetzel@gmx.de> |
---|---|
date | Sun, 15 Jul 2018 19:51:23 +0200 |
parents | 815cfd72ddf5 |
children | 306e2ce55f27 |
files | liboctave/wrappers/unistd-wrappers.c |
diffstat | 1 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/wrappers/unistd-wrappers.c Sun Jul 15 19:49:19 2018 +0200 +++ b/liboctave/wrappers/unistd-wrappers.c Sun Jul 15 19:51:23 2018 +0200 @@ -454,7 +454,14 @@ int octave_unlink_wrapper (const char *nm) { +#if defined (OCTAVE_USE_WINDOWS_API) + wchar_t *wnm = u8_to_wchar (nm); + int status = _wunlink (wnm); + free ((void *) wnm); + return status; +#else return unlink (nm); +#endif } pid_t