Revision: 10059 http://pure-data.svn.sourceforge.net/pure-data/?rev=10059&view=rev Author: eighthave Date: 2008-06-21 07:08:20 -0700 (Sat, 21 Jun 2008)
Log Message: ----------- quote the prefs filename in case there are special chars or spaces in the path
Modified Paths: -------------- branches/pd-extended/v0-40/pd/src/s_file.c
Modified: branches/pd-extended/v0-40/pd/src/s_file.c =================================================================== --- branches/pd-extended/v0-40/pd/src/s_file.c 2008-06-21 13:59:13 UTC (rev 10058) +++ branches/pd-extended/v0-40/pd/src/s_file.c 2008-06-21 14:08:20 UTC (rev 10059) @@ -255,7 +255,7 @@ if (stat(embedded_prefs_file, &statbuf) == 0) { snprintf(cmdbuf, FILENAME_MAX + 20, - "defaults read %s %s 2> /dev/null\n", embedded_prefs, key); + "defaults read '%s' %s 2> /dev/null\n", embedded_prefs, key); strncpy(current_prefs, embedded_prefs, FILENAME_MAX); } else if (stat(user_prefs_file, &statbuf) == 0) @@ -267,7 +267,7 @@ else { snprintf(cmdbuf, FILENAME_MAX + 20, - "defaults read %s %s 2> /dev/null\n", default_prefs, key); + "defaults read '%s' %s 2> /dev/null\n", default_prefs, key); strcpy(current_prefs, "org.puredata.pd"); } FILE *fp = popen(cmdbuf, "r"); @@ -301,7 +301,7 @@ { char cmdbuf[MAXPDSTRING]; snprintf(cmdbuf, MAXPDSTRING, - "defaults write %s %s "%s" 2> /dev/null\n", + "defaults write '%s' %s "%s" 2> /dev/null\n", current_prefs, key, value); system(cmdbuf); }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.