aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Files/Cache
Commit message (Collapse)AuthorAgeFilesLines
...
* | Support getting and setting metadata in DAV requestsLouis Chemineau2023-11-083-19/+27
| | | | | | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
* | IFilesMetadataMaxence Lange2023-11-071-1/+1
| | | | | | Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
* | IFilesMetadataMaxence Lange2023-11-073-58/+112
| | | | | | Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
* | optimize cache jail creationRobin Appelman2023-10-191-2/+0
|/ | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Convert isset ternary to null coalescing operatorHamid Dehnavi2023-09-281-2/+2
| | | | Signed-off-by: Hamid Dehnavi <hamid.dev.pro@gmail.com>
* Store size in int|float for 32bit supportCôme Chilliet2023-09-191-3/+6
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* fix: Only read unencrypted_size when file is actually encryptedJulius Härtl2023-09-061-1/+1
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* reuse dependencies from wrapped cacheRobin Appelman2023-08-181-3/+11
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* fix: Prevent PHP warnings when optional CacheEntry attributes are unsetFerdinand Thiessen2023-08-162-4/+4
| | | | Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* select the fileid first when looking for incomplete filesRobin Appelman2023-08-141-5/+9
| | | | | | this seems to improve mariadbs index selection Signed-off-by: Robin Appelman <robin@icewind.nl>
* fix: simplify `sourceData` checkJohn Molakvoæ2023-08-051-1/+1
| | | | Co-authored-by: Git'Fellow <12234510+solracsf@users.noreply.github.com> Signed-off-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
* Catch more invalid cache source storage pathsJosh Richards2023-08-031-1/+1
| | | | | | | | | | OC\Files\Cache\Cache::get can return string|false|null, not just string|false. - nextcloud/server#26270 added handling of false, but null is needed too. - Well, or we change the default $resullt to false, but I'm not sure if that has other ramifications and the real need here is to simply catch situations where the cache source storage path is not valid for whatever reason Related: nextcloud/server#19009 Signed-off-by: Josh Richards <josh.t.richards@gmail.com>
* Merge pull request #38860 from nextcloud/scanner-change-summaryRobin Appelman2023-07-201-1/+1
|\ | | | | add summary of detected changes to files:scan output
| * add summary of detected changes to files:scan outputRobin Appelman2023-06-161-1/+1
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | chore: Replace \OC::$server->query with \OCP\Server::get in /libChristoph Wurst2023-07-061-1/+1
| | | | | | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* | Merge pull request #37969 from nextcloud/poc/noid/systemtags-perf-tag-endpointJulius Härtl2023-06-282-32/+50
|\ \
| * | fix: include invisible tags for adminsArthur Schiwon2023-06-212-41/+36
| | | | | | | | | | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
| * | fix: favorites view and universal search against tagsArthur Schiwon2023-06-211-17/+30
| | | | | | | | | | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
| * | fix: change if with conditionless else to switch; and a parameter valueArthur Schiwon2023-06-211-19/+24
| | | | | | | | | | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
| * | use efficient tag retrieval on DAV report requestArthur Schiwon2023-06-211-16/+21
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - uses DAV search approach against valid files joined by systemtag selector - reduced table join for tag/systemtag search - supports pagination - no changes to the output formats or similar Example request body: <?xml version="1.0"?> <oc:filter-files xmlns:d="DAV:" xmlns:oc="http://owncloud.org/ns" xmlns:nc="http://nextcloud.org/ns" xmlns:ocs="http://open-collaboration-services.org/ns"> <d:prop> <d:getcontentlength/> <d:getcontenttype/> <d:getetag/> <d:getlastmodified/> <d:resourcetype/> <nc:face-detections/> <nc:file-metadata-size/> <nc:has-preview/> <nc:realpath/> <oc:favorite/> <oc:fileid/> <oc:permissions/> <nc:nbItems/> </d:prop> <oc:filter-rules> <oc:systemtag>32</oc:systemtag> </oc:filter-rules> <d:limit> <d:nresults>50</d:nresults> <nc:firstresult>0</nc:firstresult> </d:limit> </oc:filter-files> Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* | Merge pull request #38858 from nextcloud/scanner-performance3Robin Appelman2023-06-261-13/+9
|\ \ | | | | | | file scanner performance improvements
| * | file scanner performance improvementsRobin Appelman2023-06-161-13/+9
| |/ | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | refactor: declare getMount() and getMountsIn() at IRootFolderArthur Schiwon2023-06-211-8/+3
| | | | | | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* | chore: ugly type jugglingArthur Schiwon2023-06-211-4/+14
| | | | | | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* | fix: expect interface, not a specific implementationArthur Schiwon2023-06-211-3/+2
|/ | | | | | | - fixes a regression when deleting folders while music app was enabled, for a LazyRoot was passed to this method. Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* chore: Drop dead private methods in /libChristoph Wurst2023-06-061-13/+0
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Merge pull request #38478 from nextcloud/backport/38440/masterSimon L2023-06-051-2/+2
|\ | | | | [master] fix: Catch Deadlock properly as execute throws Doctrine exceptions not our wrapped ones
| * fix: execute throws docrine exceptions not our wrapped onesJulius Härtl2023-05-261-2/+2
| | | | | | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* | Merge pull request #38261 from fsamapoor/replace_strpos_calls_in_lib_privateRobin Appelman2023-06-016-6/+6
|\ \ | |/ |/| Refactors "strpos" calls in lib/private to improve code readability.
| * Refactors "strpos" calls in lib/private to improve code readability.Faraz Samapoor2023-05-156-6/+6
| | | | | | | | Signed-off-by: Faraz Samapoor <fsamapoor@gmail.com>
* | Merge pull request #38196 from nextcloud/fix/fix-32bits-freespace-and-sizesCôme Chilliet2023-05-155-11/+12
|\ \ | |/ |/| Get rid of more int casts in file size manipulations
| * Fix return types in phpdocCôme Chilliet2023-05-155-5/+5
| | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
| * Get rid of more int casts in file size manipulationsCôme Chilliet2023-05-111-6/+7
| | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | Merge pull request #37709 from nextcloud/bugfix/deadlockJulius Härtl2023-05-131-2/+6
|\ \ | |/ |/|
| * fix: Check for wrapped retriable exceptionsJulius Härtl2023-05-021-2/+6
| | | | | | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* | Merge pull request #37961 from nextcloud/poc/noid/systemtags-perfArthur Schiwon2023-05-112-22/+98
|\ \ | | | | | | SystemTags endpoint to return tags used by a user with meta data
| * | refactor: remove where specification from SELECT getterArthur Schiwon2023-05-102-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | - search constraints are now fully in control of SystemTagsInFilesDetector::detectAssignedSystemTagsIn(), avoids duplication of a WHERE statement Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
| * | refactor: remove SystemTag logic from Folder into QuerySearchHelperArthur Schiwon2023-05-091-0/+39
| | | | | | | | | | | | | | | | | | | | | - adds OC\SystemTag\SystemTagsInFilesDetector where the search logic is moved to Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
| * | feat: specify media type via url path: systemtags-current/$mediaTypeArthur Schiwon2023-05-091-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - only the media part of the mime type can be search, but not the full mime type. It can be added, should it become necessary. - thus fixes previously hardcoded selector for image/ types - also fixes a return type hint - adds a return type hint Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
| * | PoC: SystemTags endpoint to return tags used by a user with meta dataArthur Schiwon2023-05-092-22/+58
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Target case is photos app: when visiting the tags category, all systemtags of the whole cloud are retrieved. In subequent steps the next tag is requested until the browser view is filled with tag tiles (i.e. previews are requested just as well). With this approach, we incorpoate the dav search and look for user related tags that are used by them, and already returns the statistics (number of files tagged with the respective tag) as well as a file id for the purpose to load the preview. This defaults to the file with the highest id. Call: curl -s -u 'user:password' \ 'https://my.nc.srv/remote.php/dav/systemtags-current' \ -X PROPFIND -H 'Accept: text/plain' \ -H 'Accept-Language: en-US,en;q=0.5' -H 'Depth: 1' \ -H 'Content-Type: text/plain;charset=UTF-8' \ --data @/home/doe/request-systemtag-props.xml With request-systemtag-props.xml: <?xml version="1.0" encoding="UTF-8"?> <d:propfind xmlns:d="DAV:"> <d:prop xmlns:oc="http://owncloud.org/ns" xmlns:nc="http://nextcloud.org/ns"> <oc:id/> <oc:display-name/> <oc:user-visible/> <oc:user-assignable/> <oc:can-assign/> <nc:files-assigned/> <nc:reference-fileid/> </d:prop> </d:propfind> Example output: … <d:response> <d:href>/master/remote.php/dav/systemtags/84</d:href> <d:propstat> <d:prop> <oc:id>84</oc:id> <oc:display-name>Computer</oc:display-name> <oc:user-visible>true</oc:user-visible> <oc:user-assignable>true</oc:user-assignable> <oc:can-assign>true</oc:can-assign> <nc:files-assigned>42</nc:files-assigned> <nc:reference-fileid>924022</nc:reference-fileid> </d:prop> <d:status>HTTP/1.1 200 OK</d:status> </d:propstat> </d:response> <d:response> <d:href>/remote.php/dav/systemtags/97</d:href> <d:propstat> <d:prop> <oc:id>97</oc:id> <oc:display-name>Bear</oc:display-name> <oc:user-visible>true</oc:user-visible> <oc:user-assignable>true</oc:user-assignable> <oc:can-assign>true</oc:can-assign> <nc:files-assigned>1</nc:files-assigned> <nc:reference-fileid>923422</nc:reference-fileid> </d:prop> <d:status>HTTP/1.1 200 OK</d:status> </d:propstat> </d:response> … Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* / repair -1 folder sizes for object store background scanRobin Appelman2023-05-101-7/+10
|/ | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Merge pull request #36857 from nextcloud/scan-repair-unencrypted-sizeRobin Appelman2023-04-245-39/+50
|\ | | | | fix unencrypted_size for folders when scanning the filesystem with encryption enabled
| * fix type hintsRobin Appelman2023-04-044-8/+6
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
| * fix unencrypted folder size when no children with unencrypted size set are leftRobin Appelman2023-04-042-31/+26
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
| * fix unencrypted_size for files when scanningRobin Appelman2023-04-041-0/+8
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
| * fix unencrypted_size for folders when scanning the filesystem with ↵Robin Appelman2023-04-042-6/+16
| | | | | | | | | | | | encryption enabled Signed-off-by: Robin Appelman <robin@icewind.nl>
* | Merge pull request #37820 from nextcloud/parent-storage-mtime-ignore-errorRobin Appelman2023-04-211-1/+13
|\ \ | | | | | | ignore errors while trying to update parent storage_mtime
| * | ignore errors while trying to update parent storage_mtimeRobin Appelman2023-04-201-1/+13
| | | | | | | | | | | | | | | | | | in the worst case this should only cause an extra rescan later Signed-off-by: Robin Appelman <robin@icewind.nl>
* | | Merge branch 'master' into enh/type-iconfig-getter-callsCôme Chilliet2023-04-201-4/+10
|\| | | | | | | | Signed-off-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
| * | improve handling of files we can't access in the scannerRobin Appelman2023-04-051-5/+11
| |/ | | | | | | | | | | | | | | instead of erroring, remove the items from the cache. this situation can be triggered if a user has access to a file but looses it afterwards Signed-off-by: Robin Appelman <robin@icewind.nl>