Add check for linux os
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
This commit is contained in:
parent
459477e2c3
commit
62bb991050
|
@ -1,6 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* @copyright Copyright (c) 2016, ownCloud, Inc.
|
* @copyright Copyright (c) 2016, ownCloud, Inc.
|
||||||
|
* @copyright Copyright (c) 2016, Lukas Reschke <lukas@statuscode.ch>
|
||||||
*
|
*
|
||||||
* @author Andreas Fischer <bantu@owncloud.com>
|
* @author Andreas Fischer <bantu@owncloud.com>
|
||||||
* @author Lukas Reschke <lukas@statuscode.ch>
|
* @author Lukas Reschke <lukas@statuscode.ch>
|
||||||
|
@ -195,8 +196,11 @@ class LargeFileHelper {
|
||||||
*/
|
*/
|
||||||
public function getFileMtime($fullPath) {
|
public function getFileMtime($fullPath) {
|
||||||
if (\OC_Helper::is_function_enabled('exec')) {
|
if (\OC_Helper::is_function_enabled('exec')) {
|
||||||
|
$os = strtolower(php_uname('s'));
|
||||||
|
if (strpos($os, 'linux') !== false) {
|
||||||
return $this->exec('stat -c %Y ' . escapeshellarg($fullPath));
|
return $this->exec('stat -c %Y ' . escapeshellarg($fullPath));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return filemtime($fullPath);
|
return filemtime($fullPath);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue