[Pkg-owncloud-commits] [owncloud] 76/134: Fixed mtime reading from OpenStack API
David Prévot
taffit at moszumanska.debian.org
Fri Apr 18 21:44:03 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository owncloud.
commit a31b37e7331befca348b97699bb71a9701081ed4
Author: Vincent Petry <pvince81 at owncloud.com>
Date: Wed Mar 26 17:20:40 2014 +0100
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 b615d24..bb22e64 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;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list