From: Tim Düsterhus Date: Sat, 16 Jul 2011 14:17:55 +0000 (+0200) Subject: Use the existing FileUtil::addTrailingSlash X-Git-Tag: 2.0.0_Beta_1~2014^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=595a33f198f3fa614745ac70a24d18e550d26619;p=GitHub%2FWoltLab%2FWCF.git Use the existing FileUtil::addTrailingSlash --- diff --git a/wcfsetup/install/files/lib/system/cache/source/DiskCacheSource.class.php b/wcfsetup/install/files/lib/system/cache/source/DiskCacheSource.class.php index 12f4aa9f15..dd89d280f6 100644 --- a/wcfsetup/install/files/lib/system/cache/source/DiskCacheSource.class.php +++ b/wcfsetup/install/files/lib/system/cache/source/DiskCacheSource.class.php @@ -87,9 +87,7 @@ class DiskCacheSource implements CacheSource { */ public function clear($directory, $filepattern, $forceDelete = false) { $filepattern = str_replace('*', '.*', str_replace('.', '\.', $filepattern)); - if (substr($directory, -1) != '/') { - $directory .= '/'; - } + $directory = FileUtil::addTrailingSlash($directory); if (@file_exists($directory)) { $dirh = opendir($directory);