Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2020-08-13 06:07:36 +0300
committerGitHub <noreply@github.com>2020-08-13 06:07:36 +0300
commitbaa64827d3caf46a79b4988327f74649899d0541 (patch)
tree91721b465566d129aa2ca3f78aeac1e43763ad7b /lib
parent6327b8a6fb448c394c119b7d830bb2b75c553b35 (diff)
parentbe73fd90fc51440474d0f5e801934cafd327b4df (diff)
Merge pull request #22209 from nextcloud/backport/21677/stable19
[stable19] Do clearstatcache() on rmdir
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Files/Storage/Local.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/private/Files/Storage/Local.php b/lib/private/Files/Storage/Local.php
index 4cf3ac4799f..6d350512b22 100644
--- a/lib/private/Files/Storage/Local.php
+++ b/lib/private/Files/Storage/Local.php
@@ -108,6 +108,7 @@ class Local extends \OC\Files\Storage\Common {
* @var \SplFileInfo $file
*/
$file = $it->current();
+ clearstatcache(true, $this->getSourcePath($file));
if (in_array($file->getBasename(), ['.', '..'])) {
$it->next();
continue;
@@ -118,6 +119,7 @@ class Local extends \OC\Files\Storage\Common {
}
$it->next();
}
+ clearstatcache(true, $this->getSourcePath($path));
return rmdir($this->getSourcePath($path));
} catch (\UnexpectedValueException $e) {
return false;
@@ -140,8 +142,8 @@ class Local extends \OC\Files\Storage\Common {
}
public function stat($path) {
- clearstatcache();
$fullPath = $this->getSourcePath($path);
+ clearstatcache(true, $fullPath);
$statResult = stat($fullPath);
if (PHP_INT_SIZE === 4 && !$this->is_dir($path)) {
$filesize = $this->filesize($path);
@@ -156,7 +158,7 @@ class Local extends \OC\Files\Storage\Common {
*/
public function getMetaData($path) {
$fullPath = $this->getSourcePath($path);
- clearstatcache();
+ clearstatcache(true, $fullPath);
$stat = @stat($fullPath);
if (!$stat) {
return null;