summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2016-09-01 10:47:57 +0200
committerMorris Jobke <hey@morrisjobke.de>2016-09-01 10:47:57 +0200
commita3c1d748297e50b18baeaead159197db275370fa (patch)
treea0a52cdb41f984df182e5c1c19f62031b2be5c14
parent4a5cd74fb29b19c975f893e0289b1b34bf5e8a62 (diff)
downloadnextcloud-server-a3c1d748297e50b18baeaead159197db275370fa.tar.gz
nextcloud-server-a3c1d748297e50b18baeaead159197db275370fa.zip
Remove unneeded Windows logic
-rw-r--r--lib/private/LargeFileHelper.php17
-rw-r--r--tests/lib/LargeFileHelperGetFileSizeTest.php15
2 files changed, 0 insertions, 32 deletions
diff --git a/lib/private/LargeFileHelper.php b/lib/private/LargeFileHelper.php
index f89d3216a39..9d0fe864033 100644
--- a/lib/private/LargeFileHelper.php
+++ b/lib/private/LargeFileHelper.php
@@ -138,23 +138,6 @@ class LargeFileHelper {
}
/**
- * @brief Tries to get the size of a file via the Windows DOM extension.
- *
- * @param string $filename Path to the file.
- *
- * @return null|int|float Number of bytes as number (float or int) or
- * null on failure.
- */
- public function getFileSizeViaCOM($filename) {
- if (class_exists('COM')) {
- $fsObj = new \COM("Scripting.FileSystemObject");
- $file = $fsObj->GetFile($filename);
- return 0 + $file->Size;
- }
- return null;
- }
-
- /**
* @brief Tries to get the size of a file via an exec() call.
*
* @param string $filename Path to the file.
diff --git a/tests/lib/LargeFileHelperGetFileSizeTest.php b/tests/lib/LargeFileHelperGetFileSizeTest.php
index 0c3a11e971a..b2735d7f619 100644
--- a/tests/lib/LargeFileHelperGetFileSizeTest.php
+++ b/tests/lib/LargeFileHelperGetFileSizeTest.php
@@ -57,21 +57,6 @@ class LargeFileHelperGetFileSizeTest extends TestCase {
/**
* @dataProvider dataFileNameProvider
*/
- public function testGetFileSizeViaCOM($filename, $fileSize) {
- if (!extension_loaded('COM')) {
- $this->markTestSkipped(
- 'The PHP Windows COM extension is required for this test.'
- );
- }
- $this->assertSame(
- $fileSize,
- $this->helper->getFileSizeViaCOM($filename)
- );
- }
-
- /**
- * @dataProvider dataFileNameProvider
- */
public function testGetFileSizeViaExec($filename, $fileSize) {
if (!\OC_Helper::is_function_enabled('exec')) {
$this->markTestSkipped(