diff options
author | dratini0 <dratini0@gmail.com> | 2015-03-23 16:12:03 +0100 |
---|---|---|
committer | dratini0 <dratini0@gmail.com> | 2015-03-23 16:12:03 +0100 |
commit | c432b52c748479b08a4b80678e3bec1f387ecf76 (patch) | |
tree | 862211ac831f109832a11fe016b84b78fcdcb2aa /lib/private/files.php | |
parent | 10e13b172afeb9d25f640415920fa9fab16d2375 (diff) | |
download | nextcloud-server-c432b52c748479b08a4b80678e3bec1f387ecf76.tar.gz nextcloud-server-c432b52c748479b08a4b80678e3bec1f387ecf76.zip |
Changed the disputed while loop to a single if.
Diffstat (limited to 'lib/private/files.php')
-rw-r--r-- | lib/private/files.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/files.php b/lib/private/files.php index 3a2e291630b..6d165bcc705 100644 --- a/lib/private/files.php +++ b/lib/private/files.php @@ -184,8 +184,8 @@ class OC_Files { if (isset($_SERVER['MOD_X_ACCEL_REDIRECT_ENABLED'])) { if (isset($_SERVER['MOD_X_ACCEL_REDIRECT_PREFIX'])) { $prefix = $_SERVER['MOD_X_ACCEL_REDIRECT_PREFIX']; - // nginx is picky about double slashes - while($prefix[strlen($prefix) - 1] === '/'){ + // nginx is picky about double slashes when matching locations + if($prefix[strlen($prefix) - 1] === '/'){ $prefix = substr($prefix, 0, -1); } $filename = $prefix . \OC\Files\Filesystem::getLocalFile($filename); |