Browse Source
check for existence before we start the db transaction
Signed-off-by: Robin Appelman <robin@icewind.nl>
pull/4396/head
Robin Appelman
9 years ago
No known key found for this signature in database
GPG Key ID: CBCA68FBAEBF98C9
1 changed files with
3 additions and
3 deletions
-
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) { |
|
|
|
|