issue58, auto-append pending slash if missing
authorAndreas Unterkircher <unki@netshadow.at>
Sat, 21 Jul 2007 07:38:18 +0000 (07:38 +0000)
committerAndreas Unterkircher <unki@netshadow.at>
Sat, 21 Jul 2007 07:38:18 +0000 (07:38 +0000)
git-svn-id: file:///var/lib/svn/phpfspot/trunk@229 fa6a889d-dae6-447d-9e79-4ba9a3039384

phpfspot_cfg.php.dist

index 42baa169a62cacc871d91dccc82df6aa8cf9e0a2..adbe0daf9dc3587bf20379966e00cfd56a89f054 100644 (file)
@@ -117,6 +117,10 @@ class PHPFSPOT_CFG {
       if(isset($this->error_found) && $this->error_found)
          exit(1);
 
       if(isset($this->error_found) && $this->error_found)
          exit(1);
 
+      /* check for pending slash on web_path */
+      if(!preg_match("/\/$/", $this->web_path))
+         $this->web_path.= "/";
+
    } // __construct()
 
    private function showError($text)
    } // __construct()
 
    private function showError($text)