From 788831f13994f76592a47290d757cb6ad0e7a70e Mon Sep 17 00:00:00 2001 From: Olivier Paroz Date: Wed, 30 Sep 2015 01:50:15 +0200 Subject: Always send a postScanFile event when done scanning a file postScanFile is important when scanning external storage as it indicates when the file is ready to be used (cherry picked from commit 9ea05c8) --- lib/private/files/cache/scanner.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/private/files/cache/scanner.php b/lib/private/files/cache/scanner.php index 50609e1e20e..2296917fcb8 100644 --- a/lib/private/files/cache/scanner.php +++ b/lib/private/files/cache/scanner.php @@ -186,9 +186,9 @@ class Scanner extends BasicEmitter { } if (!empty($newData)) { $data['fileid'] = $this->addToCache($file, $newData, $fileId); - $this->emit('\OC\Files\Cache\Scanner', 'postScanFile', array($file, $this->storageId)); - \OC_Hook::emit('\OC\Files\Cache\Scanner', 'post_scan_file', array('path' => $file, 'storage' => $this->storageId)); } + $this->emit('\OC\Files\Cache\Scanner', 'postScanFile', array($file, $this->storageId)); + \OC_Hook::emit('\OC\Files\Cache\Scanner', 'post_scan_file', array('path' => $file, 'storage' => $this->storageId)); } else { $this->removeFromCache($file); } -- cgit v1.2.3