Commit b32d31a2 authored by Thomas Müller's avatar Thomas Müller
Browse files

Merge pull request #13836 from owncloud/part-no-cache-update

Dont update the cache when working with part files
parents 88126498 adf9a4e4
......@@ -31,6 +31,9 @@ class Updater {
}
public function propagate($path, $time = null) {
if (Scanner::isPartialFile($path)) {
return;
}
$this->propagator->addChange($path);
$this->propagator->propagateChanges($time);
}
......@@ -42,6 +45,9 @@ class Updater {
* @param int $time
*/
public function update($path, $time = null) {
if(Scanner::isPartialFile($path)) {
return;
}
/**
* @var \OC\Files\Storage\Storage $storage
* @var string $internalPath
......@@ -64,6 +70,9 @@ class Updater {
* @param string $path
*/
public function remove($path) {
if (Scanner::isPartialFile($path)) {
return;
}
/**
* @var \OC\Files\Storage\Storage $storage
* @var string $internalPath
......@@ -88,6 +97,9 @@ class Updater {
* @param string $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 $targetStorage
......
......@@ -811,7 +811,7 @@ class View {
if (in_array('delete', $hooks) and $result) {
$this->updater->remove($path);
}
if (in_array('write', $hooks)) {
if (in_array('write', $hooks) and $operation !== 'fopen') {
$this->updater->update($path);
}
if (in_array('touch', $hooks)) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment