From: TheSFReader Date: Sat, 2 Feb 2013 22:18:29 +0000 (+0100) Subject: Remove a warning by making sure the renamed file is a dir before trying and opening it X-Git-Tag: v5.0.0alpha1~137^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=42d59d5a1658dde5d428ae855de524411c311048;p=nextcloud-server.git Remove a warning by making sure the renamed file is a dir before trying and opening it --- diff --git a/lib/files/cache/scanner.php b/lib/files/cache/scanner.php index bf0ef01d6b3..8d504af6163 100644 --- a/lib/files/cache/scanner.php +++ b/lib/files/cache/scanner.php @@ -94,7 +94,7 @@ class Scanner { } $size = 0; - if ($dh = $this->storage->opendir($path)) { + if ($this->storage->is_dir($path) && ($dh = $this->storage->opendir($path))) { \OC_DB::beginTransaction(); while ($file = readdir($dh)) { if ($file !== '.' and $file !== '..') {