Remove not existent function call
- Removes a not existent function call - Removes a fallback for Windows Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
This commit is contained in:
parent
740ff9108b
commit
df3444493b
|
@ -155,7 +155,7 @@ class Local extends \OC\Files\Storage\Common {
|
||||||
$fullPath = $this->getSourcePath($path);
|
$fullPath = $this->getSourcePath($path);
|
||||||
if (PHP_INT_SIZE === 4) {
|
if (PHP_INT_SIZE === 4) {
|
||||||
$helper = new \OC\LargeFileHelper;
|
$helper = new \OC\LargeFileHelper;
|
||||||
return $helper->getFilesize($fullPath);
|
return $helper->getFileSize($fullPath);
|
||||||
}
|
}
|
||||||
return filesize($fullPath);
|
return filesize($fullPath);
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,7 +51,7 @@ class LargeFileHelper {
|
||||||
public function __construct() {
|
public function __construct() {
|
||||||
$pow_2_53 = floatval(self::POW_2_53_MINUS_1) + 1.0;
|
$pow_2_53 = floatval(self::POW_2_53_MINUS_1) + 1.0;
|
||||||
if ($this->formatUnsignedInteger($pow_2_53) !== self::POW_2_53) {
|
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".'
|
'This class assumes floats to be double precision or "better".'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -98,10 +98,6 @@ class LargeFileHelper {
|
||||||
if (!is_null($fileSize)) {
|
if (!is_null($fileSize)) {
|
||||||
return $fileSize;
|
return $fileSize;
|
||||||
}
|
}
|
||||||
$fileSize = $this->getFileSizeViaCOM($filename);
|
|
||||||
if (!is_null($fileSize)) {
|
|
||||||
return $fileSize;
|
|
||||||
}
|
|
||||||
$fileSize = $this->getFileSizeViaExec($filename);
|
$fileSize = $this->getFileSizeViaExec($filename);
|
||||||
if (!is_null($fileSize)) {
|
if (!is_null($fileSize)) {
|
||||||
return $fileSize;
|
return $fileSize;
|
||||||
|
@ -154,12 +150,6 @@ class LargeFileHelper {
|
||||||
$result = $this->exec("stat -c %s $arg");
|
$result = $this->exec("stat -c %s $arg");
|
||||||
} else if (strpos($os, 'bsd') !== false || strpos($os, 'darwin') !== false) {
|
} else if (strpos($os, 'bsd') !== false || strpos($os, 'darwin') !== false) {
|
||||||
$result = $this->exec("stat -f %z $arg");
|
$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;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue