diff options
Diffstat (limited to 'lib/private/Files/Utils')
-rw-r--r-- | lib/private/Files/Utils/Scanner.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/private/Files/Utils/Scanner.php b/lib/private/Files/Utils/Scanner.php index 5d126f2bcc3..02f355fd4d9 100644 --- a/lib/private/Files/Utils/Scanner.php +++ b/lib/private/Files/Utils/Scanner.php @@ -212,15 +212,15 @@ class Scanner extends PublicEmitter { $this->triggerPropagator($storage, $path); }); + if (!$storage->file_exists($relativePath)) { + throw new NotFoundException($dir); + } if (!$isDbLocking) { $this->db->beginTransaction(); } try { $propagator = $storage->getPropagator(); $propagator->beginBatch(); - if (!$storage->file_exists($relativePath)) { - throw new NotFoundException($dir); - } $scanner->scan($relativePath, \OC\Files\Cache\Scanner::SCAN_RECURSIVE, \OC\Files\Cache\Scanner::REUSE_ETAG | \OC\Files\Cache\Scanner::REUSE_SIZE); $cache = $storage->getCache(); if ($cache instanceof Cache) { |