From bf84cd4bccceaaccd0209cacfbad474bbd448348 Mon Sep 17 00:00:00 2001 From: Lukas Reschke Date: Tue, 14 Oct 2014 12:58:00 +0200 Subject: [PATCH] Add darwin to if block Otherwise it would fall into the 'win' else block because strpos($os, 'win') does also match 'darwin' what is the `php_uname` for OS X. --- 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 d5b7946feff..f925a4457f2 100644 --- a/lib/private/largefilehelper.php +++ b/lib/private/largefilehelper.php @@ -151,7 +151,7 @@ class LargeFileHelper { $result = null; if (strpos($os, 'linux') !== false) { $result = $this->exec("stat -c %s $arg"); - } else if (strpos($os, 'bsd') !== false) { + } else if (strpos($os, 'bsd') !== false || strpos($os, 'darwin') !== false) { $result = $this->exec("stat -f %z $arg"); } else if (strpos($os, 'win') !== false) { $result = $this->exec("for %F in ($arg) do @echo %~zF"); -- 2.39.5