aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Files/Cache
Commit message (Collapse)AuthorAgeFilesLines
...
* | Fix various other small psalm issuesCarl Schwan2022-10-171-1/+1
|/ | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Fix unencrypted size calculation for files created before the Encryption ↵raul2022-10-031-1/+1
| | | | | | storage is enabled Signed-off-by: raul <raul@nextcloud.com>
* Fix: Prevent deadlocks during mtime/size/etag propagationraul2022-10-031-17/+29
| | | | Signed-off-by: raul <raul@nextcloud.com>
* directly build the search filter for shared storage instead of setting up ↵Robin Appelman2022-08-171-2/+6
| | | | | | the source cache Signed-off-by: Robin Appelman <robin@icewind.nl>
* Merge pull request #32943 from ↵Vincent Petry2022-08-172-30/+40
|\ | | | | | | | | nextcloud/unencrypted-size-revert-interface-changes Revert interface changes from "store unencrypted size in the unencrypted_size column"
| * fix updating size when folder is emptyRobin Appelman2022-08-161-13/+17
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
| * store unencrypted size in the unencrypted_size columnRobin Appelman2022-08-163-8/+62
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
| * Revert "store unencrypted size in the unencrypted_size column"Robin Appelman2022-08-163-53/+5
| | | | | | | | | | | | This reverts commit 8238582e59b7b6ec03318bcf81bf47cce54af320. Signed-off-by: Robin Appelman <robin@icewind.nl>
* | Merge pull request #33550 from nextcloud/jail-search-postVincent Petry2022-08-171-5/+7
|\ \ | | | | | | optimize search post-processing for jail wrapper
| * | optimize search post-processing for jail wrapperRobin Appelman2022-08-161-5/+7
| |/ | | | | | | | | | | don't both asking the wrapped cache if we know it's not in our jail anyway Signed-off-by: Robin Appelman <robin@icewind.nl>
* | Merge pull request #33551 from nextcloud/scanner-dont-update-same-sizeVincent Petry2022-08-171-3/+10
|\ \ | | | | | | don't update the folder size if we know it hasn't changed
| * | don't update the folder size if we know it hasn't changedRobin Appelman2022-08-161-3/+10
| |/ | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* / fixed the cache searchBuilder negative mapDavid2022-08-161-1/+1
|/ | | Signed-off-by: David <37280718+yeyulantu@users.noreply.github.com>
* Document all getIncomplete implementations as returning string|falseCôme Chilliet2022-08-022-2/+2
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Fix dynamic property creations in test filesCôme Chilliet2022-08-011-1/+1
| | | | | | This fixes warnings in PHP 8.2 Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Fix typos in lib/private subdirectoryluz paz2022-07-276-9/+9
| | | | | | Found via `codespell -q 3 -S l10n -L jus ./lib/private` Signed-off-by: luz paz <luzpaz@github.com>
* Check whether entry is of type ICacheEntry in Cache->remove()Jonas2022-06-291-1/+1
| | | | | | | | | | | | | In some scenarios (file not in cache, but partial data of it in the object), Cache->get() might return an array, which leads to errors like "Call to a member function getId() on array". So check whether the returned entry is of type ICacheEntry before doing operations on it in Cache->remove(). Fixes: #33023 Signed-off-by: Jonas <jonas@freesources.org>
* Search without join on filecache_extendedCarl Schwan2022-06-232-5/+9
| | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* store unencrypted size in the unencrypted_size columnRobin Appelman2022-06-024-6/+54
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Files: Extend search to also cover tagsMarcel Klehr2022-05-173-7/+22
| | | | | | fixes #326 Signed-off-by: Marcel Klehr <mklehr@gmx.net>
* Migrate more classes of lib/private to LoggerInterfaceCôme Chilliet2022-04-261-9/+8
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* tell mysql to ignore the sort index for search queriesRobin Appelman2022-04-221-0/+11
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Merge pull request #31713 from nextcloud/fed-performanceRobin Appelman2022-04-072-3/+8
|\ | | | | Federated share performance improvements
| * only request free space once for external sharesRobin Appelman2022-04-041-1/+1
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
| * don't overwrite the etag from storage backends that already provide "good" etagsRobin Appelman2022-04-042-2/+7
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | Merge pull request #31816 from ↵Joas Schilling2022-04-041-0/+1
|\ \ | | | | | | | | | | | | nextcloud/bugfix/noid/deduplicate-storage-id-before-reusing Deduplicate storage ids in list before reusing
| * | Deduplicate storage ids in list before reusingJoas Schilling2022-04-041-0/+1
| |/ | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* | Merge pull request #31776 from nextcloud/storage-id-cache-bi-directionalRobin Appelman2022-04-042-16/+32
|\ \ | |/ |/| cache storage id mapping both ways
| * cache storage id mapping both waysRobin Appelman2022-03-312-16/+32
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | Adapt more code to migration to LoggerInterfaceCôme Chilliet2022-03-241-2/+3
| | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | Migrate from ILogger to LoggerInterface in lib/privateCôme Chilliet2022-03-242-6/+5
|/ | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* some file scanner performance improvementsRobin Appelman2022-03-171-3/+2
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* return dummy availability if storage is not found in cacheRobin Appelman2022-02-251-2/+5
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Switch logical operatorsacsfer2021-12-031-4/+4
| | | Unless there is a good reason to keep actual ones 👀
* background scan the source storage when a background scan on a storage jail ↵Robin Appelman2021-12-021-12/+25
| | | | | | is triggered Signed-off-by: Robin Appelman <robin@icewind.nl>
* Fix ArrayAccess and JsonSerializable return typesCôme Chilliet2021-11-231-3/+7
| | | | | | First round of modifications for PHP 8.1 Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Normalize directory entries in Encoding wrapperVincent Petry2021-11-171-1/+4
| | | | | | | | | | | | Directory entry file names are now normalized in getMetaData(), getDirectoryContents() and opendir(). This makes the scanner work properly as it assumes pre-normalized names. In case the names were not normalized, the scanner will now skip the entries and display a warning when applicable. Signed-off-by: Vincent Petry <vincent@nextcloud.com>
* Move storage encoding compatibility warning logicVincent Petry2021-11-171-2/+8
| | | | | | | | | | | The encoding check for file names is now happening the Scanner, and an event will be emitted only if the storage doesn't contain the encoding compatibility wrapper. The event is listened to by the occ scan command to be able to display a warning in case of file name mismatches when they have NFD encoding. Signed-off-by: Vincent Petry <vincent@nextcloud.com>
* Normalize file name before existence check in scannerVincent Petry2021-11-171-0/+1
| | | | | | | | | | | | The scanner would not find a NFD-encoded file name in an existing file list that is normalized. This normalizes the file name before scanning. Fixes issues where scanning repeatedly would make NFD files flicker in and out of existence in the file cache. Signed-off-by: Vincent Petry <vincent@nextcloud.com>
* properly handle cases where cache wrappers block accessRobin Appelman2021-11-012-3/+4
| | | | | | `CacheWrapper::formatCacheEntry` can return false for files that should be filtered out Signed-off-by: Robin Appelman <robin@icewind.nl>
* Merge pull request #29281 from vijfhoek/masterJohn Molakvoæ2021-11-012-6/+14
|\
| * Move query outside the loop and reduce chunk size to 1000Sijmen Schoon2021-10-172-12/+14
| | | | | | | | | | | | | | This involved changing CacheQueryBuilder\whereParentIn to take a parameter name, renaming the function accordingly. Signed-off-by: Sijmen Schoon <me@sijmenschoon.nl>
| * Limit parameter count per query in Cache.removeChildrenSijmen Schoon2021-10-171-8/+14
| | | | | | | | Signed-off-by: Sijmen Schoon <me@sijmenschoon.nl>
* | Merge pull request #29115 from ↵Carl Schwan2021-10-281-1/+1
|\ \ | | | | | | | | | | | | nextcloud/work/carl/correct-permissions-when-copying Fix permissions when copying from ObjectStorage
| * | Fix permissions when copying from ObjectStorageCarl Schwan2021-10-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make sure that when a user copy a file from a directory they don't have all permissions to a directory where they have more permissions, the permissions are correctly set to the one from the parent taget folder. This was caused by the ObjectStoreStorage::copyFromStorage using the jailed storage and cache entry instead of the unjailed one like other storages (the local one). Steps to reproduce + Use object storage + Create a groupfolder with one group having full permission and another one who can just read files. + With an user who is in the second group, copy a file from the groupfolder to the home folder of this user. + The file in the home folder of the user will be read only and can't be deleted even though it is in their home folder and they are the owner. In oc_filecache, the permissions stored for this file are 1 (READ) Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* | | more reliable return value for Watcher::checkUpdateRobin Appelman2021-10-151-1/+8
| |/ |/| | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | generate a better optimized query for path prefix search filtersRobin Appelman2021-08-262-9/+17
|/ | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Merge pull request #28476 from nextcloud/search-jail-insensitiveVincent Petry2021-08-242-3/+5
|\ | | | | use case insensitive like when limiting search to jail
| * use case insensitive like when limiting search to jailRobin Appelman2021-08-172-3/+5
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | use getGetUnjailedRoot to determine if jailed search needs the path filterRobin Appelman2021-08-231-1/+1
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>