diff options
author | Vincent Petry <pvince81@owncloud.com> | 2014-10-13 15:52:48 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2014-10-13 17:37:33 +0200 |
commit | d6a380613f11b416d7186fbb264e64b7e8ac2c79 (patch) | |
tree | cfea79577c735ea7b2aedf44ed94f2051e6f1636 /lib | |
parent | c38454a5b243a1c135250326d76867284aec6328 (diff) | |
download | nextcloud-server-d6a380613f11b416d7186fbb264e64b7e8ac2c79.tar.gz nextcloud-server-d6a380613f11b416d7186fbb264e64b7e8ac2c79.zip |
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
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/files/cache/storage.php | 2 |
1 files changed, 1 insertions, 1 deletions
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)); |