summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorMichael Roitzsch <reactorcontrol@icloud.com>2014-08-07 15:41:58 +0200
committerVincent Petry <pvince81@owncloud.com>2014-11-17 13:42:23 +0100
commit643835e2b3a105faa1dc46cd81b67733829ffd6c (patch)
tree18c6f6c527597d48779cf3da9afdacff6b8274e4 /lib/private
parent32401b42f1c5122c4aaa4e868599702c36d3c51d (diff)
downloadnextcloud-server-643835e2b3a105faa1dc46cd81b67733829ffd6c.tar.gz
nextcloud-server-643835e2b3a105faa1dc46cd81b67733829ffd6c.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.
Diffstat (limited to 'lib/private')
-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 806e6e76702..750ba1d23de 100644
--- a/lib/private/largefilehelper.php
+++ b/lib/private/largefilehelper.php
@@ -148,7 +148,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 || strpos($os, 'darwin') !== false) {