Skip to content

Commit

Permalink
Add check for linux os
Browse files Browse the repository at this point in the history
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
  • Loading branch information
LukasReschke committed Oct 25, 2016
1 parent 459477e commit 62bb991
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/private/LargeFileHelper.php
Original file line number Diff line number Diff line change
@@ -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>
Expand Down Expand Up @@ -195,7 +196,10 @@ public function getFileSizeNative($filename) {
*/
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);
Expand Down

0 comments on commit 62bb991

Please sign in to comment.