<p>In <a href="https://github.com/geany/geany/pull/809#discussion_r47502059">src/spawn.c</a>:</p>
<pre style='color:#555'>> @@ -372,8 +374,29 @@ static gchar *spawn_create_process_with_pipes(char *command_line, const char *wo
>    startup.hStdOutput = hpipe[WRITE_STDOUT];
>    startup.hStdError = hpipe[WRITE_STDERR];
>  
> -  if (!CreateProcess(NULL, command_line, NULL, NULL, TRUE, pipe_io ? CREATE_NO_WINDOW : 0,
> -          environment, working_directory, &startup, &process))
> +  if (! MultiByteToWideChar(
> +          CP_UTF8, 0, working_directory, -1, w_working_directory, G_N_ELEMENTS(w_working_directory)))
> +  {
> +          gchar *err = g_win32_error_message(GetLastError());
> +          message = g_strdup_printf(
> +                  "Failed to convert working directory to multi-byte string: %s", err);
> +          g_free(err);
> +          failed = "";  /* report the message only */
</pre>
<p>if I read the error handler below correctly, it would be shorter, simpler and more consistent to just do</p>

<div class="highlight highlight-source-c"><pre>failed = <span class="pl-s"><span class="pl-pds">"</span>convert working directory to multi-byte string<span class="pl-pds">"</span></span>;
<span class="pl-k">goto</span> leave;</pre></div>

<p>and let the common handler build the full message.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href="https://github.com/geany/geany/pull/809/files#r47502059">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABDrJ4rWb3RmgSb-TfL8ey6uKq3A74gXks5pPsgAgaJpZM4G0VWF.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/geany/geany/pull/809/files#r47502059"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>