From 32067f9e8043ee5ac8e6735743a94c146bba6c4c Mon Sep 17 00:00:00 2001
From: Robin Appelman <icewind@owncloud.com>
Date: Thu, 23 Apr 2015 18:34:06 +0200
Subject: [PATCH] use microtime to prevent race conditions

---
 apps/files_sharing/lib/propagation/recipientpropagator.php | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/apps/files_sharing/lib/propagation/recipientpropagator.php b/apps/files_sharing/lib/propagation/recipientpropagator.php
index e1b3523ca68..9c9fe2bedbf 100644
--- a/apps/files_sharing/lib/propagation/recipientpropagator.php
+++ b/apps/files_sharing/lib/propagation/recipientpropagator.php
@@ -52,7 +52,7 @@ class RecipientPropagator {
 	 */
 	public function propagateDirtyMountPoints(array $shares, $time = null) {
 		if ($time === null) {
-			$time = time();
+			$time = microtime(true);
 		}
 		$dirtyShares = $this->getDirtyShares($shares);
 		foreach ($dirtyShares as $share) {
@@ -88,7 +88,7 @@ class RecipientPropagator {
 	 */
 	public function markDirty($share, $time = null) {
 		if ($time === null) {
-			$time = time();
+			$time = microtime(true);
 		}
 		$this->config->setAppValue('files_sharing', $share['id'], $time);
 	}
@@ -104,7 +104,7 @@ class RecipientPropagator {
 			$shares = Share::getAllSharesForFileId($entry['fileid']);
 			foreach ($shares as $share) {
 				// propagate down the share tree
-				$this->markDirty($share, time());
+				$this->markDirty($share, microtime(true));
 
 				// propagate up the share tree
 				$user = $share['uid_owner'];
-- 
GitLab