Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/private/Files/Storage/Local.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ public function filesize($path) {
$fullPath = $this->getSourcePath($path);
if (PHP_INT_SIZE === 4) {
$helper = new \OC\LargeFileHelper;
return $helper->getFilesize($fullPath);
return $helper->getFileSize($fullPath);
}
return filesize($fullPath);
}
Expand Down
12 changes: 1 addition & 11 deletions lib/private/LargeFileHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class LargeFileHelper {
public function __construct() {
$pow_2_53 = floatval(self::POW_2_53_MINUS_1) + 1.0;
if ($this->formatUnsignedInteger($pow_2_53) !== self::POW_2_53) {
throw new \RunTimeException(
throw new \RuntimeException(
'This class assumes floats to be double precision or "better".'
);
}
Expand Down Expand Up @@ -98,10 +98,6 @@ public function getFileSize($filename) {
if (!is_null($fileSize)) {
return $fileSize;
}
$fileSize = $this->getFileSizeViaCOM($filename);
if (!is_null($fileSize)) {
return $fileSize;
}
$fileSize = $this->getFileSizeViaExec($filename);
if (!is_null($fileSize)) {
return $fileSize;
Expand Down Expand Up @@ -154,12 +150,6 @@ public function getFileSizeViaExec($filename) {
$result = $this->exec("stat -c %s $arg");
} else if (strpos($os, 'bsd') !== false || strpos($os, 'darwin') !== false) {
$result = $this->exec("stat -f %z $arg");
} else if (strpos($os, 'win') !== false) {
$result = $this->exec("for %F in ($arg) do @echo %~zF");
if (is_null($result)) {
// PowerShell
$result = $this->exec("(Get-Item $arg).length");
}
}
return $result;
}
Expand Down