Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion apps/files_sharing/lib/SharedMount.php
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,12 @@ public function getStorageNumericId() {
->from('filecache')
->where($query->expr()->eq('fileid', $query->createNamedParameter($this->getStorageRootId())));

return $query->execute()->fetchColumn();
$result = $query->execute();
$row = $result->fetch();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

close cursor?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will do

$result->closeCursor();
if ($row) {
return $row['storage'];
}
return -1;
}
}
5 changes: 4 additions & 1 deletion apps/files_sharing/lib/sharedstorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
use OCP\Files\Storage\IStorage;
use OCP\Lock\ILockingProvider;
use OC\Files\Storage\FailedStorage;
use OCP\Files\NotFoundException;

/**
* Convert target path to source path and pass the function call to the correct storage provider
Expand Down Expand Up @@ -104,7 +105,9 @@ private function init() {

} catch (\Exception $e) {
$this->sourceStorage = new FailedStorage(['exception' => $e]);
$this->logger->logException($e);
if (!$e instanceof NotFoundException) {
$this->logger->logException($e);
}
}
$this->storage = $this->sourceStorage;
}
Expand Down
3 changes: 2 additions & 1 deletion lib/private/Files/Config/UserMountCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,8 @@ private function addToCache(ICachedMountInfo $mount) {
'mount_point' => $mount->getMountPoint()
], ['root_id', 'user_id']);
} else {
$this->logger->error('Error getting storage info for mount at ' . $mount->getMountPoint());
// in some cases this is legitimate, like orphaned shares
$this->logger->debug('Could not get storage info for mount at ' . $mount->getMountPoint());
}
}

Expand Down