]> source.dussan.org Git - nextcloud-server.git/commitdiff
Add check for linux os 1890/head
authorLukas Reschke <lukas@statuscode.ch>
Tue, 25 Oct 2016 10:01:03 +0000 (12:01 +0200)
committerLukas Reschke <lukas@statuscode.ch>
Tue, 25 Oct 2016 10:01:03 +0000 (12:01 +0200)
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
lib/private/LargeFileHelper.php

index b75cdcc210eee2305942af90e1cd38fb1a64ad4b..258e53acf9d67a1eabaf39429414d1377c914c6f 100644 (file)
@@ -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);