diff --git a/lib/files/cache/legacy.php b/lib/files/cache/legacy.php
index 55e40e1af7205db0d1ca0e2379be787be20b31c4..d9ba36bb3a44e572ab98b9e24972a8d7d460cea4 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 {