diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2023-01-12 16:05:03 +0100 |
---|---|---|
committer | Côme Chilliet <come.chilliet@nextcloud.com> | 2023-02-07 11:23:28 +0100 |
commit | e156f8339cec0ae97ed62344ce1f186600b6b909 (patch) | |
tree | dd874b1ccc2079184ace112445f235d33669f8b3 /lib/private/Files/Storage/Local.php | |
parent | 3885818ab67f941a54d8b186945399e55c9ac6fe (diff) | |
download | nextcloud-server-e156f8339cec0ae97ed62344ce1f186600b6b909.tar.gz nextcloud-server-e156f8339cec0ae97ed62344ce1f186600b6b909.zip |
Revert "remove 32-bit workarounds"
This reverts commit dd8774389e21b59c07882580356d51de018fe867.
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'lib/private/Files/Storage/Local.php')
-rw-r--r-- | lib/private/Files/Storage/Local.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/private/Files/Storage/Local.php b/lib/private/Files/Storage/Local.php index b021d40d335..4b5154b207a 100644 --- a/lib/private/Files/Storage/Local.php +++ b/lib/private/Files/Storage/Local.php @@ -171,6 +171,11 @@ class Local extends \OC\Files\Storage\Common { return false; } $statResult = @stat($fullPath); + if (PHP_INT_SIZE === 4 && $statResult && !$this->is_dir($path)) { + $filesize = $this->filesize($path); + $statResult['size'] = $filesize; + $statResult[7] = $filesize; + } if (is_array($statResult)) { $statResult['full_path'] = $fullPath; } @@ -242,6 +247,10 @@ class Local extends \OC\Files\Storage\Common { return 0; } $fullPath = $this->getSourcePath($path); + if (PHP_INT_SIZE === 4) { + $helper = new \OC\LargeFileHelper; + return $helper->getFileSize($fullPath); + } return filesize($fullPath); } @@ -263,6 +272,10 @@ class Local extends \OC\Files\Storage\Common { if (!$this->file_exists($path)) { return false; } + if (PHP_INT_SIZE === 4) { + $helper = new \OC\LargeFileHelper(); + return $helper->getFileMtime($fullPath); + } return filemtime($fullPath); } |