summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Roitzsch <reactorcontrol@icloud.com>2014-08-07 15:41:58 +0200
committerMichael Roitzsch <reactorcontrol@icloud.com>2014-08-07 15:41:58 +0200
commitcde1a9241d8a3a616517223eafbca0b406a50aac (patch)
tree16ec91c903b9f5951f63af144575b4b0b6cab2e8
parente33fc2807cef5c4e797f244e782c23e78a1d02fe (diff)
downloadnextcloud-server-cde1a9241d8a3a616517223eafbca0b406a50aac.tar.gz
nextcloud-server-cde1a9241d8a3a616517223eafbca0b406a50aac.zip
file size on non-(Linux/BSD/Windows)-installations
Determining the file size using the exec() method is implemented for Linux, BSD, and Windows. However, on systems matching neither platform name (like SunOS), the fall-through path will return a file size result constituting a zero size instead of an invalid null return value.
-rw-r--r--lib/private/largefilehelper.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/largefilehelper.php b/lib/private/largefilehelper.php
index 293e09fe2c9..2c35feefc8b 100644
--- a/lib/private/largefilehelper.php
+++ b/lib/private/largefilehelper.php
@@ -147,7 +147,7 @@ class LargeFileHelper {
if (\OC_Helper::is_function_enabled('exec')) {
$os = strtolower(php_uname('s'));
$arg = escapeshellarg($filename);
- $result = '';
+ $result = null;
if (strpos($os, 'linux') !== false) {
$result = $this->exec("stat -c %s $arg");
} else if (strpos($os, 'bsd') !== false) {