Browse Source

bring up fix for default_pref file name (double-slash)

Erin Schnabel 22 years ago
parent
commit
85092927dc
1 changed files with 4 additions and 1 deletions
  1. 4 1
      functions/file_prefs.php

+ 4 - 1
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)) {