diff options
author | Robin Appelman <robin@icewind.nl> | 2020-03-02 14:24:45 +0100 |
---|---|---|
committer | backportbot[bot] <backportbot[bot]@users.noreply.github.com> | 2020-05-01 16:22:50 +0000 |
commit | 3998f94ec0c18d79fc86e5ddc4aee7b244b222c0 (patch) | |
tree | 944b0abed703781d1aaf7ccefd51f022f311408f /lib/private | |
parent | de43edca3b3e7694eb3116d8aec9858b3c469b18 (diff) | |
download | nextcloud-server-3998f94ec0c18d79fc86e5ddc4aee7b244b222c0.tar.gz nextcloud-server-3998f94ec0c18d79fc86e5ddc4aee7b244b222c0.zip |
dont try to update storage mtime if we can't get the mtime
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib/private')
-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 + ] + ); + } } } |