From 1fb44bc7a7a8cde197fa8a4fee7fe2f49e69562e Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Mon, 1 Jun 2015 16:17:00 +0200 Subject: Properly return fileid when scanFile() did not find differences --- lib/private/files/cache/scanner.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib') diff --git a/lib/private/files/cache/scanner.php b/lib/private/files/cache/scanner.php index 4778a6803ba..166c4e89b0a 100644 --- a/lib/private/files/cache/scanner.php +++ b/lib/private/files/cache/scanner.php @@ -155,6 +155,8 @@ class Scanner extends BasicEmitter { $data['fileid'] = $this->addToCache($file, $newData); $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 if (!empty($cacheData)) { + $data['fileid'] = $cacheData['fileid']; } } else { $this->removeFromCache($file); -- cgit v1.2.3