mirror of
https://github.com/nextcloud/server.git
synced 2026-04-24 15:53:36 -04:00
* fixing php 32 bit (arm) filemtime on large file issue (#18971) * cast to int
This commit is contained in:
parent
e23a298a81
commit
cfc0d9249b
1 changed files with 9 additions and 2 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue