[Pkg-owncloud-commits] [owncloud] 16/74: file size on non-(Linux/BSD/Windows)-installations

David Prévot taffit at moszumanska.debian.org
Tue Dec 2 22:04:33 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository owncloud.

commit 643835e2b3a105faa1dc46cd81b67733829ffd6c
Author: Michael Roitzsch <reactorcontrol at icloud.com>
Date:   Thu Aug 7 15:41:58 2014 +0200

    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.
---
 lib/private/largefilehelper.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/private/largefilehelper.php b/lib/private/largefilehelper.php
index 806e6e7..750ba1d 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) {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list