Skip to content

Commit

Permalink
partially closes #289
Browse files Browse the repository at this point in the history
fixes the priority as stated by @umlaeute in #289 (comment)
  • Loading branch information
porres committed Aug 10, 2019
1 parent 3e1e938 commit d5296b3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/s_path.c
Original file line number Diff line number Diff line change
Expand Up @@ -237,10 +237,12 @@ void sys_setextrapath(const char *p)
{
char pathbuf[MAXPDSTRING];
namelist_free(STUFF->st_staticpath);
/* add built-in "extra" path first so its checked first */
STUFF->st_staticpath = namelist_append(0, p, 0);
/* add standard place for users to install stuff first */
#ifdef __gnu_linux__
sys_expandpath("~/.local/lib/pd/extra/", pathbuf, MAXPDSTRING);
STUFF->st_staticpath = namelist_append(0, pathbuf, 0);
STUFF->st_staticpath = namelist_append(STUFF->st_staticpath, pathbuf, 0);
sys_expandpath("~/pd-externals", pathbuf, MAXPDSTRING);
STUFF->st_staticpath = namelist_append(STUFF->st_staticpath, pathbuf, 0);
STUFF->st_staticpath = namelist_append(STUFF->st_staticpath,
Expand All @@ -249,18 +251,16 @@ void sys_setextrapath(const char *p)

#ifdef __APPLE__
sys_expandpath("~/Library/Pd", pathbuf, MAXPDSTRING);
STUFF->st_staticpath = namelist_append(0, pathbuf, 0);
STUFF->st_staticpath = namelist_append(STUFF->st_staticpath, pathbuf, 0);
STUFF->st_staticpath = namelist_append(STUFF->st_staticpath, "/Library/Pd", 0);
#endif

#ifdef _WIN32
sys_expandpath("%AppData%/Pd", pathbuf, MAXPDSTRING);
STUFF->st_staticpath = namelist_append(0, pathbuf, 0);
STUFF->st_staticpath = namelist_append(STUFF->st_staticpath, pathbuf, 0);
sys_expandpath("%CommonProgramFiles%/Pd", pathbuf, MAXPDSTRING);
STUFF->st_staticpath = namelist_append(STUFF->st_staticpath, pathbuf, 0);
#endif
/* add built-in "extra" path last so its checked last */
STUFF->st_staticpath = namelist_append(STUFF->st_staticpath, p, 0);
}

/* try to open a file in the directory "dir", named "name""ext",
Expand Down

0 comments on commit d5296b3

Please sign in to comment.