]> git.sesse.net Git - vlc/commitdiff
Win32: use ShellExecuteW instead of ShellExecuteA in the update code
authorGeoffroy Couprie <geal@videolan.org>
Wed, 3 Mar 2010 19:38:02 +0000 (20:38 +0100)
committerGeoffroy Couprie <geal@videolan.org>
Fri, 5 Mar 2010 19:35:58 +0000 (20:35 +0100)
Fixes #3355

src/misc/update.c

index 138f60792d3ddfa9c7c281a8f5908cc2dd535bf2..4225226505e9851b40990b4fc54f0e11d94a1390 100644 (file)
@@ -739,7 +739,9 @@ static void* update_DownloadReal( vlc_object_t *p_this )
 
     if(answer == 1)
     {
-        answer = ShellExecuteA( NULL, "open", psz_destfile, NULL, NULL, SW_SHOW);
+        wchar_t psz_wdestfile[MAX_PATH];
+        MultiByteToWideChar( CP_UTF8, 0, psz_destfile, -1, psz_wdestfile, MAX_PATH );
+        answer = ShellExecuteW( NULL, L"open", psz_wdestfile, NULL, NULL, SW_SHOW);
         if(answer > 32)
             libvlc_Quit(p_this->p_libvlc);
     }