diff options
author | Vincent Petry <pvince81@owncloud.com> | 2014-03-26 17:20:40 +0100 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2014-03-26 17:20:40 +0100 |
commit | fa00a18677e0b95784fdb433aa3616dc74da1154 (patch) | |
tree | 2e09ce485ccf1ff7fac2919a2abb4fe2d31ad270 | |
parent | d57bb70b032b7a55fa8935300df611142f86c726 (diff) | |
download | nextcloud-server-fa00a18677e0b95784fdb433aa3616dc74da1154.tar.gz nextcloud-server-fa00a18677e0b95784fdb433aa3616dc74da1154.zip |
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.
-rw-r--r-- | apps/files_external/lib/swift.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/files_external/lib/swift.php b/apps/files_external/lib/swift.php index 7a56fcfc8b7..a6955d400f4 100644 --- a/apps/files_external/lib/swift.php +++ b/apps/files_external/lib/swift.php @@ -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; |