]> source.dussan.org Git - nextcloud-server.git/commitdiff
using rtrim
authorThomas Mueller <thomas.mueller@tmit.eu>
Tue, 19 Mar 2013 12:37:48 +0000 (13:37 +0100)
committerThomas Mueller <thomas.mueller@tmit.eu>
Tue, 19 Mar 2013 12:37:48 +0000 (13:37 +0100)
lib/setup.php

index e9c090c5b6a74bc4c8dff431bb933746d1703ded..b4b07bd70e494cac213f05e08f8bc7e470ae83f9 100644 (file)
@@ -71,10 +71,7 @@ class OC_Setup {
                        $datadir = htmlspecialchars_decode($options['directory']);
 
                        if (OC_Util::runningOnWindows()) {
-                               $datadir = realpath($datadir);
-                               if (substr($datadir, -1) == '\\') {
-                                       $datadir = substr_replace($datadir ,"",-1);
-                               }
+                               $datadir = rtrim(realpath($datadir), '\\');
                        }
 
                        //use sqlite3 when available, otherise sqlite2 will be used.