From fa00a18677e0b95784fdb433aa3616dc74da1154 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Wed, 26 Mar 2014 17:20:40 +0100 Subject: [PATCH] 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. --- apps/files_external/lib/swift.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/files_external/lib/swift.php b/apps/files_external/lib/swift.php index 7a56fcfc8b..a6955d400f 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;