From 1a874b910642e3a174ecdf355ec1749bc6b3b716 Mon Sep 17 00:00:00 2001
From: Robin Appelman <icewind@owncloud.com>
Date: Sun, 24 Mar 2013 17:01:04 +0100
Subject: [PATCH] Cache: fix property path for getting legacy etag

---
 lib/files/cache/legacy.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/files/cache/legacy.php b/lib/files/cache/legacy.php
index 55e40e1af7..d9ba36bb3a 100644
--- a/lib/files/cache/legacy.php
+++ b/lib/files/cache/legacy.php
@@ -90,7 +90,7 @@ class Legacy {
 			$relativePath = '';
 		}
 		$query = \OC_DB::prepare('SELECT `propertyvalue` FROM `*PREFIX*properties` WHERE `userid` = ? AND propertypath = ? AND propertyname = "{DAV:}getetag"');
-		$result = $query->execute(array($user, $relativePath));
+		$result = $query->execute(array($user, '/' . $relativePath));
 		if ($row = $result->fetchRow()) {
 			return trim($row['propertyvalue'], '"');
 		} else {
-- 
GitLab