mirror of
https://github.com/nextcloud/server.git
synced 2026-06-14 19:20:35 -04: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.
Backport of fa00a18 from master
This commit is contained in:
parent
f464620a65
commit
a31b37e733
1 changed files with 4 additions and 0 deletions
|
|
@ -245,6 +245,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 a new issue