mirror of
https://github.com/nextcloud/server.git
synced 2025-10-26 19:21:34 +00:00
Fixed mtime reading from OpenStack API
The API seems to return floating point values, which prevents the hasUpdated() check to work and causes the scanner to rescan everything every time.
This commit is contained in:
parent
d57bb70b03
commit
fa00a18677
@ -251,6 +251,10 @@ class Swift extends \OC\Files\Storage\Common {
|
||||
$mtime = $object->extra_headers['X-Object-Meta-Timestamp'];
|
||||
}
|
||||
|
||||
if (!empty($mtime)) {
|
||||
$mtime = floor($mtime);
|
||||
}
|
||||
|
||||
$stat = array();
|
||||
$stat['size'] = $object->content_length;
|
||||
$stat['mtime'] = $mtime;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user