]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fixed mtime reading from OpenStack API
authorVincent Petry <pvince81@owncloud.com>
Wed, 26 Mar 2014 16:20:40 +0000 (17:20 +0100)
committerVincent Petry <pvince81@owncloud.com>
Wed, 26 Mar 2014 16:20:40 +0000 (17:20 +0100)
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

index 7a56fcfc8b773fcf77b8c8e1769f5ff584a2be60..a6955d400f46fc7db0ba405bee0761d98a28b495 100644 (file)
@@ -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;