summaryrefslogtreecommitdiffstats
path: root/apps/files_external/lib/swift.php
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2014-03-26 17:20:40 +0100
committerVincent Petry <pvince81@owncloud.com>2014-03-26 17:20:40 +0100
commitfa00a18677e0b95784fdb433aa3616dc74da1154 (patch)
tree2e09ce485ccf1ff7fac2919a2abb4fe2d31ad270 /apps/files_external/lib/swift.php
parentd57bb70b032b7a55fa8935300df611142f86c726 (diff)
downloadnextcloud-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.
Diffstat (limited to 'apps/files_external/lib/swift.php')
-rw-r--r--apps/files_external/lib/swift.php4
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;