Skip to content
Snippets Groups Projects
Commit 14a11419 authored by Ivica Bukvic's avatar Ivica Bukvic
Browse files

fixed pd~ external not finding the gui dir bug

parent 18c109f4
No related branches found
No related tags found
No related merge requests found
...@@ -459,6 +459,14 @@ void sys_findprogdir(char *progname) ...@@ -459,6 +459,14 @@ void sys_findprogdir(char *progname)
/* go back to the parent from there, e.g., ~/pd */ /* go back to the parent from there, e.g., ~/pd */
lastslash = strrchr(sbuf, '/'); lastslash = strrchr(sbuf, '/');
if (lastslash) if (lastslash)
{
strncpy(sbuf2, sbuf, lastslash-sbuf);
sbuf2[lastslash-sbuf] = 0;
}
/* go back to the parent from there once more, e.g., ~/pd */
strcpy(sbuf, sbuf2);
lastslash = strrchr(sbuf, '/');
if (lastslash)
{ {
strncpy(sbuf2, sbuf, lastslash-sbuf); strncpy(sbuf2, sbuf, lastslash-sbuf);
sbuf2[lastslash-sbuf] = 0; sbuf2[lastslash-sbuf] = 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment