From 62bb991050b20b443f8f11cf04e0a331648d2519 Mon Sep 17 00:00:00 2001 From: Lukas Reschke Date: Tue, 25 Oct 2016 12:01:03 +0200 Subject: [PATCH] Add check for linux os Signed-off-by: Lukas Reschke --- lib/private/LargeFileHelper.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/private/LargeFileHelper.php b/lib/private/LargeFileHelper.php index b75cdcc210..258e53acf9 100644 --- a/lib/private/LargeFileHelper.php +++ b/lib/private/LargeFileHelper.php @@ -1,6 +1,7 @@ * * @author Andreas Fischer * @author Lukas Reschke @@ -195,7 +196,10 @@ class LargeFileHelper { */ public function getFileMtime($fullPath) { if (\OC_Helper::is_function_enabled('exec')) { - return $this->exec('stat -c %Y ' . escapeshellarg($fullPath)); + $os = strtolower(php_uname('s')); + if (strpos($os, 'linux') !== false) { + return $this->exec('stat -c %Y ' . escapeshellarg($fullPath)); + } } return filemtime($fullPath);