[Pkg-owncloud-commits] [owncloud] 50/85: Fix recursive scanning
David Prévot
taffit at moszumanska.debian.org
Tue Jun 17 19:12:44 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch 6.0
in repository owncloud.
commit f36e354a42b027c586f445efcc1b567a5970a409
Author: Robin Appelman <icewind at owncloud.com>
Date: Mon Jun 2 21:04:36 2014 +0200
Fix recursive scanning
---
lib/private/files/cache/scanner.php | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/lib/private/files/cache/scanner.php b/lib/private/files/cache/scanner.php
index 0acdf55..5df0b79 100644
--- a/lib/private/files/cache/scanner.php
+++ b/lib/private/files/cache/scanner.php
@@ -175,6 +175,7 @@ class Scanner extends BasicEmitter {
* @return int the id of the added file
*/
protected function addToCache($path, $data) {
+ echo "add";
\OC_Hook::emit('Scanner', 'addToCache', array('file' => $path, 'data' => $data));
$this->emit('\OC\Files\Cache\Scanner', 'addToCache', array($path, $this->storageId, $data));
if ($this->cacheActive) {
@@ -246,10 +247,11 @@ class Scanner extends BasicEmitter {
try {
$data = $this->scanFile($child, $reuse, true);
if ($data) {
+ if ($data['mimetype'] === 'httpd/unix-directory' and $recursive === self::SCAN_RECURSIVE) {
+ $childQueue[] = $child;
+ }
if ($data['size'] === -1) {
- if ($recursive === self::SCAN_RECURSIVE) {
- $childQueue[] = $child;
- } else {
+ if ($recursive !== self::SCAN_RECURSIVE) {
$size = -1;
}
} else if ($size !== -1) {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list