From d6a380613f11b416d7186fbb264e64b7e8ac2c79 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Mon, 13 Oct 2014 15:52:48 +0200 Subject: Retrieve storage numeric id earlier when still available The numeric id is only available before the storage entry is deleted, so get it at that time. Backport of d485c0098d58454b8dbd25e574a363a500244942 from master --- lib/private/files/cache/storage.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/private/files/cache/storage.php b/lib/private/files/cache/storage.php index 9ad31a272ea..7c14a9ff077 100644 --- a/lib/private/files/cache/storage.php +++ b/lib/private/files/cache/storage.php @@ -98,10 +98,10 @@ class Storage { if (strlen($storageId) > 64) { $storageId = md5($storageId); } + $numericId = self::getNumericStorageId($storageId); $sql = 'DELETE FROM `*PREFIX*storages` WHERE `id` = ?'; \OC_DB::executeAudited($sql, array($storageId)); - $numericId = self::getNumericStorageId($storageId); if (!is_null($numericId)) { $sql = 'DELETE FROM `*PREFIX*filecache` WHERE `storage` = ?'; \OC_DB::executeAudited($sql, array($numericId)); -- cgit v1.2.3