diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2020-05-11 17:43:47 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-11 17:43:47 +0300 |
commit | 394ca6f7ce9332a390e3b0e1b0687d2558ab839f (patch) | |
tree | ef2f0b4975d18c2f3e18bc07816fdbe94427cdd1 /lib | |
parent | a30b0e125c35fe16d84985fdb5fdf69c918e72cd (diff) | |
parent | 3998f94ec0c18d79fc86e5ddc4aee7b244b222c0 (diff) |
Merge pull request #20774 from nextcloud/backport/19743/stable18
[stable18] dont try to update storage mtime if we can't get the mtime
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Files/Cache/Updater.php | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/lib/private/Files/Cache/Updater.php b/lib/private/Files/Cache/Updater.php index 3809d4c2aeb..59cff9b3a41 100644 --- a/lib/private/Files/Cache/Updater.php +++ b/lib/private/Files/Cache/Updater.php @@ -224,12 +224,15 @@ class Updater implements IUpdater { private function updateStorageMTimeOnly($internalPath) { $fileId = $this->cache->getId($internalPath); if ($fileId !== -1) { - $this->cache->update( - $fileId, [ - 'mtime' => null, // this magic tells it to not overwrite mtime - 'storage_mtime' => $this->storage->filemtime($internalPath) - ] - ); + $mtime = $this->storage->filemtime($internalPath); + if ($mtime !== false) { + $this->cache->update( + $fileId, [ + 'mtime' => null, // this magic tells it to not overwrite mtime + 'storage_mtime' => $mtime + ] + ); + } } } |