summaryrefslogtreecommitdiffstats
path: root/lib/private/LargeFileHelper.php
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2016-10-25 12:01:03 +0200
committerLukas Reschke <lukas@statuscode.ch>2016-10-25 12:01:03 +0200
commit62bb991050b20b443f8f11cf04e0a331648d2519 (patch)
treec6c3346605b71358fbee6496b0f9620a8aa620f3 /lib/private/LargeFileHelper.php
parent459477e2c3981d28605f6cb304afedd8ec6f5a3b (diff)
downloadnextcloud-server-62bb991050b20b443f8f11cf04e0a331648d2519.tar.gz
nextcloud-server-62bb991050b20b443f8f11cf04e0a331648d2519.zip
Add check for linux os
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
Diffstat (limited to 'lib/private/LargeFileHelper.php')
-rw-r--r--lib/private/LargeFileHelper.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/private/LargeFileHelper.php b/lib/private/LargeFileHelper.php
index b75cdcc210e..258e53acf9d 100644
--- a/lib/private/LargeFileHelper.php
+++ b/lib/private/LargeFileHelper.php
@@ -1,6 +1,7 @@
<?php
/**
* @copyright Copyright (c) 2016, ownCloud, Inc.
+ * @copyright Copyright (c) 2016, Lukas Reschke <lukas@statuscode.ch>
*
* @author Andreas Fischer <bantu@owncloud.com>
* @author Lukas Reschke <lukas@statuscode.ch>
@@ -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);