Explorar o código

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

Erin Schnabel %!s(int64=22) %!d(string=hai) anos
pai
achega
85092927dc
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  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)) {