summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-02-19 00:08:10 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2015-02-19 00:08:10 +0100
commitb32d31a2f13c5a6222a9b3fe7f7af92b4795634b (patch)
tree1e2f0466200e10161ce1e2f09f2d539e1015279a
parent88126498a0308122c178ec5336fe80b1d10079fb (diff)
parentadf9a4e4eb4f2eb4b4639d7241fd5a333eed248f (diff)
downloadnextcloud-server-b32d31a2f13c5a6222a9b3fe7f7af92b4795634b.tar.gz
nextcloud-server-b32d31a2f13c5a6222a9b3fe7f7af92b4795634b.zip
Merge pull request #13836 from owncloud/part-no-cache-update
Dont update the cache when working with part files
-rw-r--r--lib/private/files/cache/updater.php12
-rw-r--r--lib/private/files/view.php2
2 files changed, 13 insertions, 1 deletions
diff --git a/lib/private/files/cache/updater.php b/lib/private/files/cache/updater.php
index 31a4a7c21e7..9f4cbfeff8c 100644
--- a/lib/private/files/cache/updater.php
+++ b/lib/private/files/cache/updater.php
@@ -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
diff --git a/lib/private/files/view.php b/lib/private/files/view.php
index 3bc9fdff1ee..120efa0f052 100644
--- a/lib/private/files/view.php
+++ b/lib/private/files/view.php
@@ -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)) {