[PD-cvs] pd/src s_file.c,1.8.2.2,1.8.2.3

Hans-Christoph Steiner eighthave at users.sourceforge.net
Fri Jun 1 00:39:14 CEST 2007


Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27841

Modified Files:
      Tag: branch-v0-39-2-extended
	s_file.c 
Log Message:
switched to using sys_libdir so that it actually finds the inside of the Pd.app for the prefs file

Index: s_file.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/s_file.c,v
retrieving revision 1.8.2.2
retrieving revision 1.8.2.3
diff -C2 -d -r1.8.2.2 -r1.8.2.3
*** s_file.c	23 May 2007 05:04:49 -0000	1.8.2.2
--- s_file.c	31 May 2007 22:39:12 -0000	1.8.2.3
***************
*** 218,226 ****
  	char embedded_prefs[MAXPDSTRING];
  	char user_prefs[MAXPDSTRING];
- 	char cwd[MAXPDSTRING];
  	char *homedir = getenv("HOME");
      struct stat statbuf;
! 	getcwd(cwd, MAXPDSTRING);
! 	snprintf(embedded_prefs, MAXPDSTRING, "%s/../org.puredata.pd", cwd);
  	snprintf(user_prefs, MAXPDSTRING, "%s/Library/Preferences/org.puredata.pd.plist", homedir);
  	if (stat(user_prefs, &statbuf) == 0)
--- 218,225 ----
  	char embedded_prefs[MAXPDSTRING];
  	char user_prefs[MAXPDSTRING];
  	char *homedir = getenv("HOME");
      struct stat statbuf;
! 	/* the 'defaults' command expects the filename without .plist at the end */
! 	snprintf(embedded_prefs, MAXPDSTRING, "%s/../org.puredata.pd", sys_libdir->s_name);
  	snprintf(user_prefs, MAXPDSTRING, "%s/Library/Preferences/org.puredata.pd.plist", homedir);
  	if (stat(user_prefs, &statbuf) == 0)





More information about the Pd-cvs mailing list