summaryrefslogtreecommitdiffstats
path: root/lib/private/Files/Storage/Local.php
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2016-10-25 14:44:27 +0200
committerGitHub <noreply@github.com>2016-10-25 14:44:27 +0200
commit27ba46c40ed1d365965a1cb79ed7d8a38d759d2c (patch)
treee3ca5b0f5229fe50ff25665e955f23205cee0e53 /lib/private/Files/Storage/Local.php
parent01a85a98f2acebe01b2af7bffb7e0a7dab7c121a (diff)
parent62bb991050b20b443f8f11cf04e0a331648d2519 (diff)
downloadnextcloud-server-27ba46c40ed1d365965a1cb79ed7d8a38d759d2c.tar.gz
nextcloud-server-27ba46c40ed1d365965a1cb79ed7d8a38d759d2c.zip
Merge pull request #1890 from nextcloud/downstream-25428
fixing php 32 bit (arm) filemtime on large file issue (#18971) (#25428)
Diffstat (limited to 'lib/private/Files/Storage/Local.php')
-rw-r--r--lib/private/Files/Storage/Local.php12
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/private/Files/Storage/Local.php b/lib/private/Files/Storage/Local.php
index bda7f2ea903..4fe7dcafbbf 100644
--- a/lib/private/Files/Storage/Local.php
+++ b/lib/private/Files/Storage/Local.php
@@ -173,8 +173,16 @@ class Local extends \OC\Files\Storage\Common {
}
public function filemtime($path) {
- clearstatcache($this->getSourcePath($path));
- return $this->file_exists($path) ? filemtime($this->getSourcePath($path)) : false;
+ $fullPath = $this->getSourcePath($path);
+ clearstatcache($fullPath);
+ if (!$this->file_exists($path)) {
+ return false;
+ }
+ if (PHP_INT_SIZE === 4) {
+ $helper = new \OC\LargeFileHelper();
+ return $helper->getFileMtime($fullPath);
+ }
+ return filemtime($fullPath);
}
public function touch($path, $mtime = null) {