Skip to content

Commit

Permalink
Revert "Close cursor early in calculateFolderSize"
Browse files Browse the repository at this point in the history
This reverts commit 234f33e.
  • Loading branch information
nickvergessen committed Jan 30, 2015
1 parent 234f33e commit 91fc933
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
3 changes: 0 additions & 3 deletions lib/private/files/cache/cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,6 @@ public function calculateFolderSize($path, $entry = null) {
'WHERE `parent` = ? AND `storage` = ?';
$result = \OC_DB::executeAudited($sql, array($id, $this->getNumericStorageId()));
if ($row = $result->fetchRow()) {
$result->closeCursor();
list($sum, $min, $unencryptedSum) = array_values($row);
$sum = 0 + $sum;
$min = 0 + $min;
Expand All @@ -563,8 +562,6 @@ public function calculateFolderSize($path, $entry = null) {
if ($totalSize !== -1 and $unencryptedSum > 0) {
$totalSize = $unencryptedSum;
}
} else {
$result->closeCursor();
}
}
return $totalSize;
Expand Down
1 change: 0 additions & 1 deletion lib/private/files/cache/homecache.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ public function calculateFolderSize($path, $entry = null) {
'WHERE `parent` = ? AND `storage` = ? AND `size` >= 0';
$result = \OC_DB::executeAudited($sql, array($id, $this->getNumericStorageId()));
if ($row = $result->fetchRow()) {
$result->closeCursor();
list($sum, $unencryptedSum) = array_values($row);
$totalSize = 0 + $sum;
$unencryptedSize = 0 + $unencryptedSum;
Expand Down

0 comments on commit 91fc933

Please sign in to comment.