From: ebullient Date: Wed, 11 Jun 2003 18:33:25 +0000 (+0000) Subject: bring up fix for default_pref file name (double-slash) X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=e8c533f6d64ecdfb87159dabc9949c0d19ccecdd;p=squirrelmail.git bring up fix for default_pref file name (double-slash) git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@5003 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/functions/file_prefs.php b/functions/file_prefs.php index 86fda622..5ed99124 100644 --- a/functions/file_prefs.php +++ b/functions/file_prefs.php @@ -182,7 +182,10 @@ function checkForPrefs($data_dir, $username, $filename = '') { /* Then, check if the file exists. */ if (!@file_exists($filename) ) { /* First, check the $data_dir for the default preference file. */ - $default_pref = $data_dir . '/default_pref'; + if(substr($data_dir,-1) != '/') { + $data_dir .= '/'; + } + $default_pref = $data_dir . 'default_pref'; /* If it is not there, check the internal data directory. */ if (!@file_exists($default_pref)) {