Skip to content
Snippets Groups Projects
Commit 3806867c authored by Jonathan Wilkes's avatar Jonathan Wilkes
Browse files

Merge branch 'aggraef/purr-data-testing'

parents 6ca7f12c 5af5c086
No related branches found
No related tags found
No related merge requests found
diff --git a/pd/src/s_file.c b/pd/src/s_file.c
index 1c18096f..576e4c36 100644
index 32f54c31..304524d5 100644
--- a/pd/src/s_file.c
+++ b/pd/src/s_file.c
@@ -62,7 +62,7 @@ static void sys_initloadpreferences( void)
sys_libdir->s_name);
@@ -46,7 +46,7 @@ void sys_doflags( void);
if (homedir)
- snprintf(user_prefs_file, FILENAME_MAX, "%s/.pd-l2ork/user.settings", homedir);
+ snprintf(user_prefs_file, FILENAME_MAX, "%s/.purr-data/user.settings", homedir);
if (stat(user_prefs_file, &statbuf) == 0)
strncpy(filenamebuf, user_prefs_file, FILENAME_MAX);
else if (stat(default_prefs_file, &statbuf) == 0)
@@ -143,7 +143,7 @@ static void sys_initsavepreferences( void)
#ifdef UNIX
-#define USER_CONFIG_DIR ".pd-l2ork"
+#define USER_CONFIG_DIR ".purr-data"
static char *sys_prefbuf;
if (!homedir)
return;
- snprintf(filenamebuf, FILENAME_MAX, "%s/.pd-l2ork", homedir);
+ snprintf(filenamebuf, FILENAME_MAX, "%s/.purr-data", homedir);
filenamebuf[FILENAME_MAX-1] = 0;
if (stat(filenamebuf, &statbuf) || !S_ISDIR(statbuf.st_mode)) {
// user config dir doesn't exist yet, try to create it
@@ -152,7 +152,7 @@ static void sys_initsavepreferences( void)
return;
}
}
- snprintf(filenamebuf, FILENAME_MAX, "%s/.pd-l2ork/user.settings", homedir);
+ snprintf(filenamebuf, FILENAME_MAX, "%s/.purr-data/user.settings", homedir);
filenamebuf[FILENAME_MAX-1] = 0;
if ((sys_prefsavefp = fopen(filenamebuf, "w")) == NULL)
{
......@@ -646,8 +646,10 @@ char *sys_recent_files[MAX_RECENT_FILES];
static int fexists(const char *s)
{
struct stat statbuf;
return stat(s, &statbuf) == 0;
FILE *fp = sys_fopen(s, "r");
if (!fp) return 0;
sys_fclose(fp);
return 1;
}
void sys_add_recent_file(const char *s)
......
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