summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Mueller <thomas.mueller@tmit.eu>2013-03-19 13:37:48 +0100
committerThomas Mueller <thomas.mueller@tmit.eu>2013-03-19 13:37:48 +0100
commit7a2396208fad5a28fd504df3ff6f15d92323e503 (patch)
tree4716efef094b2aa928bfe57ad55edd217cc86a84
parent2fe56b8969406ce6b3ade6d9d2adfb8740329478 (diff)
downloadnextcloud-server-7a2396208fad5a28fd504df3ff6f15d92323e503.tar.gz
nextcloud-server-7a2396208fad5a28fd504df3ff6f15d92323e503.zip
using rtrim
-rw-r--r--lib/setup.php5
1 files changed, 1 insertions, 4 deletions
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.