summaryrefslogtreecommitdiffstats
path: root/lib/private/Files/Cache
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #18079 from nextcloud/fixes/phpcsRoeland Jago Douma2019-11-253-4/+4
|\ | | | | Some php-cs fixes
| * Some php-cs fixesRoeland Jago Douma2019-11-223-4/+4
| | | | | | | | | | | | | | | | | | | | | | * Order the imports * No leading slash on imports * Empty line before namespace * One line per import * Empty after imports * Emmpty line at bottom of file Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* | Harden watcherRoeland Jago Douma2019-11-221-2/+2
|/ | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Fix cache movesRoeland Jago Douma2019-11-181-1/+4
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* filter out empty filecache extension valuesRobin Appelman2019-11-131-1/+1
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* fix folder deleteRobin Appelman2019-11-131-3/+9
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* dont create empty filecache extended rowsRobin Appelman2019-11-131-19/+33
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* store filecache extension fieldsRobin Appelman2019-11-133-27/+110
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* move more cache logic to querybuilderRobin Appelman2019-11-132-169/+254
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Fix DAV mimetype searchRoeland Jago Douma2019-10-281-4/+7
| | | | | | | | | Fixes #15048 Catches the case where a full mimetype is sumbitted in the where like clause. Before we didn't catch this and it was just forwarded as is causing invalid queries. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* use OCP\EventDispatcher\Event over Symfony's deprecated EventArthur Schiwon2019-10-171-1/+1
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* use eq instead of in for loading single storageRobin Appelman2019-09-261-1/+9
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* log which storage id can't be insertedRobin Appelman2019-09-261-1/+1
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* set a storage availability delay on auth issues to avoid lock outArthur Schiwon2019-08-221-2/+3
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Properly return an int in the getId function of the cacheRoeland Jago Douma2019-08-071-1/+1
| | | | | | fixes #16684 Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Remove deprecated searchByTagRoeland Jago Douma2019-07-264-74/+0
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* 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>