From 595a33f198f3fa614745ac70a24d18e550d26619 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Sat, 16 Jul 2011 16:17:55 +0200 Subject: [PATCH] Use the existing FileUtil::addTrailingSlash --- .../files/lib/system/cache/source/DiskCacheSource.class.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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); -- 2.20.1