aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Files/Cache
Commit message (Collapse)AuthorAgeFilesLines
* remove extra param in cache update callRobin Appelman2019-05-071-2/+2
| | | | | | param was leftover from earlier iterations of the "update event" Signed-off-by: Robin Appelman <robin@icewind.nl>
* Avoid calculating folder size for parent that needs scan.Ari Selseng2019-03-064-8/+32
| | | | Signed-off-by: Ari Selseng <ari@selseng.net>
* add event for cache updateRobin Appelman2019-02-182-1/+75
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* add event for inserting cache entriesRobin Appelman2019-02-072-10/+18
| | | | | | | | this provides a reliable way for apps to listen to new files without the need to of cache wrappers to hook into inserts themselves (something which isn't 100% reliable) Signed-off-by: Robin Appelman <robin@icewind.nl>
* Merge pull request #12865 from nextcloud/fix/do_not_propogate_in_appdataMorris Jobke2018-12-061-3/+12
|\ | | | | No need to propogate changes in appdata
| * No need to propogate changes in appdataRoeland Jago Douma2018-12-051-3/+12
| | | | | | | | | | | | | | | | Right now we propogate a lof of changes in appdata. So for example we propogate each and every preview that is added to the system. This has no real added value as far as I can tell. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* | Only execute query in propagateChange onceRoeland Jago Douma2018-12-051-2/+2
|/ | | | | | | The second execute statement should be inside the if block. Else it gets executed twice which makes no sense. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* return the correct value when trying to get a non existing item from cache by idRobin Appelman2018-11-161-0/+2
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Merge pull request #11942 from nextcloud/techdebt/noid/use-count-functionMorris Jobke2018-11-121-4/+4
|\ | | | | Use the defined func()->count() instead of manual counting
| * Use the defined func()->count() instead of manual countingJoas Schilling2018-11-081-4/+4
| | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* | Fix UniqueConstraintViolationException while insert into oc_filecacheMorris Jobke2018-11-121-7/+18
|/ | | | | | | | * fixes #6160 by not being prone to the race condition in insertIfNotExists * fixes #12228 by not using a query that can result in a deadlock * replaces the insertIfNotExists call with an insert which is wrapped into a try-catch block Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Properly search the root of a shared external storageRoeland Jago Douma2018-11-051-1/+1
| | | | | | | | | | | Fixes #1020 When an external storage is shared with you in full the root is '' (empty). This adds an extra check for an empty jail basically. Because if the jail is on the empty string. It matches all paths. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* pass `Cache::getMoveInfo` along cache wrappersRobin Appelman2018-10-171-0/+6
| | | | | | fixes cross storage move in some cases Signed-off-by: Robin Appelman <robin@icewind.nl>
* cleanup locks in scanner on errorRobin Appelman2018-05-041-9/+12
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* move log constants to ILoggerArthur Schiwon2018-04-261-2/+3
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* CacheJail should apply limit and offset after searchingRoeland Jago Douma2018-02-071-2/+9
| | | | | | Else the results might not be correct. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Do not try to get the jailed path if we can't find the idRoeland Jago Douma2018-02-031-0/+4
| | | | | | | | | Fixes #8047 If we can't find the file by id there we should just return null instead of trying to get the jailed path of null. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Use ::class statement instead of stringMorris Jobke2018-01-291-1/+1
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Remove unneeded semicolon and parenthesesMorris Jobke2018-01-263-4/+4
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Merge pull request #8058 from nextcloud/useless-returnRoeland Jago Douma2018-01-261-7/+0
|\ | | | | Remove useless return statements
| * Remove useless return statementsMorris Jobke2018-01-251-7/+0
| | | | | | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* | Use proper code flow instead of not needed else branchMorris Jobke2018-01-251-2/+1
|/ | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Properly log the full exception instead of only the messageMorris Jobke2018-01-231-1/+5
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Support arbitrary number of arguments for d:or and d:and in search queriesRobin Appelman2018-01-161-2/+12
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Remove deprecated \OCP\ConfigRoeland Jago Douma2018-01-131-1/+0
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* delay calculating the shared cache root until it's usedRobin Appelman2017-12-041-9/+14
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Use basename() instead of self implementationMorris Jobke2017-11-231-2/+2
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Update license headersMorris Jobke2017-11-068-12/+20
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* unlock file when an exception occurs during scanningRobin Appelman2017-08-261-69/+87
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Use IConfig instead of static OCP\ConfigMorris Jobke2017-07-271-1/+1
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Merge pull request #5812 from MrJeos/masterMorris Jobke2017-07-221-1/+1
|\ | | | | Fix for mb strlen
| * Fix for mb strlenArtem Kochnev2017-07-201-1/+1
| | | | | | Error with moving files with long names in UTF-8
* | Also repair storage id's when repairing invalid entriesRobin Appelman2017-07-211-1/+1
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | Add Phan plugin to check for SQL injectionsLukas Reschke2017-07-202-0/+3
|/ | | | | | | | | | This adds a phan plugin which checks for SQL injections on code using our QueryBuilder, while it isn't perfect it should already catch most potential issues. As always, static analysis will sometimes have false positives and this is also here the case. So in some cases the analyzer just doesn't know if something is potential user input or not, thus I had to add some `@suppress SqlInjectionChecker` in front of those potential injections. The Phan plugin hasn't the most awesome code but it works and I also added a file with test cases. Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* Fix propagating changes within jail wrapperRobin Appelman2017-07-111-0/+44
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* fix moving folders out of a cache jailRobin Appelman2017-06-151-1/+11
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* use unmasked permissions during scanningRobin Appelman2017-05-182-0/+4
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Remove unused use statementsMorris Jobke2017-04-222-2/+0
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Allow searching file by fileidRobin Appelman2017-04-051-1/+3
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* rename fun to funcRobin Appelman2017-03-301-1/+1
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Add tests for query builder (i)likeRobin Appelman2017-03-301-1/+1
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Move all children of a folder in a single queryRobin Appelman2017-03-301-18/+27
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Merge pull request #4004 from nextcloud/backport-27172Roeland Jago Douma2017-03-281-0/+8
|\ | | | | Remove SharedCache::getNumericStorageId to let CacheWrapper do it
| * Remove SharedCache::getNumericStorageId to let CacheWrapper do itVincent Petry2017-03-231-0/+8
| | | | | | | | | | | | The CacheWrapper will properly forward the call to the wrapped cache. Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* | Merge pull request #3850 from nextcloud/search-orderMorris Jobke2017-03-232-0/+13
|\ \ | |/ |/| Fix search ordering
| * Fix search orderingRobin Appelman2017-03-232-0/+13
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | [OC/Files/Cache]: Fix wrong usage of basenameXuanwo2017-03-141-1/+2
|/ | | | | | Fix https://github.com/nextcloud/server/issues/3837 Signed-off-by: Xuanwo <xuanwo@yunify.com>
* dont allow empty wildcard searchRobin Appelman2017-03-131-0/+4
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Allow searching for favoritesRobin Appelman2017-03-082-6/+47
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Implement webdav SEARCHRobin Appelman2017-03-015-23/+74
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>