aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBoris Rybalkin <ribalkin@gmail.com>2016-09-29 10:10:35 +0100
committerLukas Reschke <lukas@statuscode.ch>2016-10-25 11:43:17 +0200
commitcfc0d9249bf53449dc8daed9c9811dc78fe7086c (patch)
tree5a8f377762619d623dc49b52a79593c993aa054e /lib
parente23a298a8155fb8f74c1ee2fcbef31a418b65db4 (diff)
downloadnextcloud-server-cfc0d9249bf53449dc8daed9c9811dc78fe7086c.tar.gz
nextcloud-server-cfc0d9249bf53449dc8daed9c9811dc78fe7086c.zip
fixing php 32 bit (arm) filemtime on large file issue (#18971) (#25428)
* fixing php 32 bit (arm) filemtime on large file issue (#18971) * cast to int
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Files/Storage/Local.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/private/Files/Storage/Local.php b/lib/private/Files/Storage/Local.php
index 0d63fd46ecc..97201621645 100644
--- a/lib/private/Files/Storage/Local.php
+++ b/lib/private/Files/Storage/Local.php
@@ -173,8 +173,15 @@ 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) {
+ return (int) exec ('stat -c %Y '. escapeshellarg ($fullPath));
+ }
+ return filemtime($fullPath);
}
public function touch($path, $mtime = null) {