From 72947e46d1a4c6066f561d3e49c032f23589e4e1 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Sat, 3 Mar 2012 20:45:17 +0100 Subject: [PATCH] small improvement for is_dir --- lib/filestorage/local.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/filestorage/local.php b/lib/filestorage/local.php index 750a1fb36d..25c3d76740 100644 --- a/lib/filestorage/local.php +++ b/lib/filestorage/local.php @@ -21,7 +21,10 @@ class OC_Filestorage_Local extends OC_Filestorage{ return opendir($this->datadir.$path); } public function is_dir($path){ - return @is_dir($this->datadir.$path); + if(substr($path,-1)=='/'){ + $path=substr($path,0,-1); + } + return is_dir($this->datadir.$path); } public function is_file($path){ return is_file($this->datadir.$path);