From: Thomas Mueller Date: Tue, 19 Mar 2013 12:37:48 +0000 (+0100) Subject: using rtrim X-Git-Tag: v5.0.1~21 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=7de540b8ee6964050d0bcfe2394ba692132d2640;p=nextcloud-server.git using rtrim --- diff --git a/lib/setup.php b/lib/setup.php index e9c090c5b6a..b4b07bd70e4 100644 --- a/lib/setup.php +++ b/lib/setup.php @@ -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.