<p>In <a href="https://github.com/geany/geany/pull/637#discussion_r38777321">src/utils.c</a>:</p>
<pre style='color:#555'>>  void utils_start_new_geany_instance(const gchar *doc_path)
>  {
> -  const gchar *command = is_osx_bundle() ? "open" : "geany";
> -  gchar *exec_path = g_find_program_in_path(command);
> +  gchar **argv;
> +  int i, persistent;
> +  int argc;
> +  GError *error = NULL;
> +
> +  for (i = 0, persistent = 0; optentries[i].long_name; i++)
> +          if (optentries_aux[i].persistent)
> +                  persistent++;
> +
> +  argv = g_new0(gchar *, persistent + 5);  /* exectuable, -i, --, doc_path, NULL */
> +  argv[0] = g_build_filename(utils_resource_dir(RESOURCE_DIR_PREFIX), "bin", "geany", NULL);
</pre>
<p>It is. Since I don't want an unneeded RESOURCE_DIR_PREFIX under OSX, and g_build_filename() scattered in utils_resource_dir() and utils_start_new_geany_instance(), I'll do the following:</p>

<ul>
<li>Rename utils_resource_dir() to utils_resource_path().</li>
<li>Rename RESOURCE_DIR_PREFIX to RESOURCE_FILE_GEANY or something (please suggest a name).</li>
<li>Alter utils_resource_path(RESOURCE_FILE_GEANY) to return gtkosx_application_get_executable_path() under OSX or prefix/bin/geany otherwise.</li>
</ul>

<p>It is the executable name that we really need from utils_resource_path(), not the RESOURCE_DIR_PREFIX.</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/637/files#r38777321">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABDrJ-_zrVrd79iqtDGVlhPIms-681mZks5oudKZgaJpZM4F1KFb.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/637/files#r38777321"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>