From 1fd201bb1d720d0c5ab727a3972363778eef834f Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 2 Nov 2013 15:03:32 +0200 Subject: Adapted dostounix_filename. w32-short/long-filename work with wide APIs. --- src/unexw32.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/unexw32.c') diff --git a/src/unexw32.c b/src/unexw32.c index a01ac799592..5320ec1e371 100644 --- a/src/unexw32.c +++ b/src/unexw32.c @@ -728,9 +728,15 @@ unexec (const char *new_name, const char *old_name) char *q; /* Ignore old_name, and get our actual location from the OS. */ - if (!GetModuleFileName (NULL, in_filename, MAX_PATH)) + if (!GetModuleFileNameA (NULL, in_filename, MAX_PATH)) abort (); - dostounix_filename (in_filename, 0); + + /* Can't use dostounix_filename here, since that needs its file name + argument encoded in UTF-8. */ + for (p = in_filename; *p; p = CharNextA (p)) + if (*p == '\\') + *p = '/'; + strcpy (out_filename, in_filename); /* Change the base of the output filename to match the requested name. */ -- cgit v1.2.1