From a31b37e7331befca348b97699bb71a9701081ed4 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. Backport of fa00a18 from master --- 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 b615d24ce76..bb22e64e968 100644 --- a/apps/files_external/lib/swift.php +++ b/apps/files_external/lib/swift.php @@ -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;