Dont bother updating the cache when working with part files

This commit is contained in:
Robin Appelman 2015-02-02 17:35:40 +01:00
parent 842d0e227c
commit adf9a4e4eb
1 changed files with 12 additions and 0 deletions

View File

@ -31,6 +31,9 @@ class Updater {
} }
public function propagate($path, $time = null) { public function propagate($path, $time = null) {
if (Scanner::isPartialFile($path)) {
return;
}
$this->propagator->addChange($path); $this->propagator->addChange($path);
$this->propagator->propagateChanges($time); $this->propagator->propagateChanges($time);
} }
@ -42,6 +45,9 @@ class Updater {
* @param int $time * @param int $time
*/ */
public function update($path, $time = null) { public function update($path, $time = null) {
if(Scanner::isPartialFile($path)) {
return;
}
/** /**
* @var \OC\Files\Storage\Storage $storage * @var \OC\Files\Storage\Storage $storage
* @var string $internalPath * @var string $internalPath
@ -64,6 +70,9 @@ class Updater {
* @param string $path * @param string $path
*/ */
public function remove($path) { public function remove($path) {
if (Scanner::isPartialFile($path)) {
return;
}
/** /**
* @var \OC\Files\Storage\Storage $storage * @var \OC\Files\Storage\Storage $storage
* @var string $internalPath * @var string $internalPath
@ -88,6 +97,9 @@ class Updater {
* @param string $target * @param string $target
*/ */
public function rename($source, $target) { public function rename($source, $target) {
if (Scanner::isPartialFile($source) or Scanner::isPartialFile($target)) {
return;
}
/** /**
* @var \OC\Files\Storage\Storage $sourceStorage * @var \OC\Files\Storage\Storage $sourceStorage
* @var \OC\Files\Storage\Storage $targetStorage * @var \OC\Files\Storage\Storage $targetStorage