summaryrefslogtreecommitdiffstats
path: root/lib/private/Files
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #12868 from nextcloud/backport/12857/stable15Morris Jobke2018-12-061-1/+1
|\ | | | | [stable15] Emit write update only once on touch
| * Emit write update only once on touchRoeland Jago Douma2018-12-051-1/+1
| | | | | | | | | | | | | | | | When a touch is done (i.e. when creating a new file in the node API) The hooks contain 'write' and 'touch' (and the operation is touch as well). This would cause a double write update. Which doesn't make sense. 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>
* Fix folder path containing leading slash when getting mount root by idRobin Appelman2018-11-281-1/+1
| | | | | | | | This fixes collabora on public link shared groupfolders Fixes https://github.com/nextcloud/groupfolders/issues/225 Signed-off-by: Robin Appelman <robin@icewind.nl>
* Merge pull request #12494 from nextcloud/cache-notfound-idMorris Jobke2018-11-201-0/+2
|\ | | | | return the correct value when trying to get a non existing item from cache by id
| * 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>
* | Add PHPDoc for thrown exceptionMorris Jobke2018-11-191-0/+1
| | | | | | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* | forward object not found error in switch as dav 404Robin Appelman2018-11-192-6/+23
|/ | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Fix string doc type casingChristoph Wurst2018-11-152-2/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Merge pull request #11942 from nextcloud/techdebt/noid/use-count-functionMorris Jobke2018-11-122-5/+5
|\ | | | | Use the defined func()->count() instead of manual counting
| * Use the defined func()->count() instead of manual countingJoas Schilling2018-11-082-5/+5
| | | | | | | | 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>
* fix writeStream for jail wrapperRobin Appelman2018-10-312-0/+18
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* allways fall back to fopen for encryption wrapperRobin Appelman2018-10-312-1/+25
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* extend storage api to allow directly writing a stream to storageRobin Appelman2018-10-314-23/+133
| | | | | | | | | | | this removes the need for temporary storages with some external storage backends. The new method is added to a separate interface to maintain compatibility with storage backends implementing the storage interface directly (without inheriting common) Currently the interface is implemented for objectstorage based storages and local storage and used by webdav uploads Signed-off-by: Robin Appelman <robin@icewind.nl>
* Add getExtension() to FileInfoRobin Appelman2018-10-294-0/+16
| | | | | | | this is a fairly common operation so it makes sense to prevent having to repeatedly implement it. Signed-off-by: Robin Appelman <robin@icewind.nl>
* Allow chunked uploads even if your quota is not sufficientRoeland Jago Douma2018-10-241-1/+1
| | | | | | | | Fixes #11485 This allows uploads to shared folders. 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>
* expose storagefactory in server containerRobin Appelman2018-10-171-2/+3
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* use name in fileinfo if setRobin Appelman2018-10-171-1/+1
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Normalize getUnjailedPathRoeland Jago Douma2018-10-111-1/+2
| | | | | | | | | Fixes #11637 If we do not normalize the unjailed path we might end up with a path like files/user/folder/. which can break on objectstores Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Move normalizePath to regexes instead of loopingRoeland Jago Douma2018-10-101-25/+16
| | | | | | | | | | | | | This is IMO a bit more readable and it seems to make the code faster. Tested it on the company instance where there are over 3k calls to this function. It shaves off around 10ms. The advantage here is that the pattern gets optimized by php itsel and cached. Also looking for all patterns at the same time and especially no longer looping for /./ patterns should save time. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* tokens can't be valid local user namesRobin Appelman2018-08-161-11/+9
| | | | | | this saves searching for shares on non-public link dav requests Signed-off-by: Robin Appelman <robin@icewind.nl>
* more efficient way to detect added and removed mountsRobin Appelman2018-08-161-9/+23
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* cache OC\Files\Mount\Manager::findIn resultsRobin Appelman2018-08-161-2/+17
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* use more efficient method to find mountpoint for pathRobin Appelman2018-08-161-18/+15
| | | | | | | this changes the complexity from the number of mounts to the depth of the path Signed-off-by: Robin Appelman <robin@icewind.nl>
* remove double loop for detecting changed mountsRobin Appelman2018-08-161-9/+12
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* use insertIfNotExists to store new mimetypes.Robin Appelman2018-08-091-14/+7
| | | | | | Also throw an error if we can't find the mimetype after insert Signed-off-by: Robin Appelman <robin@icewind.nl>
* Merge pull request #10397 from nextcloud/encryption-s3-fixBjörn Schießle2018-08-081-2/+17
|\ | | | | make file cache updates more robust
| * make file cache updates more robustBjoern Schiessle2018-07-311-2/+17
| | | | | | | | | | | | only update the encrypted version after the write operation is finished and the stream is closed Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
* | Do not log to error loglevel when converting the errorRoeland Jago Douma2018-08-061-1/+1
|/ | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Do scan the root storage in background scanRobin Appelman2018-07-241-5/+0
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Use the path_hash instead of the path to query the filecacheMorris Jobke2018-07-161-1/+1
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Merge pull request #10179 from nextcloud/mount-filterMorris Jobke2018-07-111-1/+22
|\ | | | | Add the option to filter mounts for a user
| * Add the option to filter mounts for a userRobin Appelman2018-07-101-1/+22
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | Separate fopen into read and write methodsJulius Härtl2018-07-111-3/+15
| | | | | | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* | Add fopen method to ISimpleFileJulius Härtl2018-07-111-0/+11
|/ | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* allow to disable encryptionBjoern Schiessle2018-07-051-2/+6
| | | | Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
* Merge pull request #10079 from nextcloud/search-double-slashMorris Jobke2018-07-021-1/+1
|\ | | | | fix double slash in search result path when the result is in a submount
| * fix double slash in search result path when the result is in a submountRobin Appelman2018-07-021-1/+1
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | Add option to only scan the home storageRobin Appelman2018-06-281-3/+8
|/ | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Add resource type phpDoc for putContent methodsJulius Härtl2018-06-263-3/+3
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Merge pull request #9526 from Blaok/files-scan-shallowRobin Appelman2018-06-251-2/+2
|\ | | | | allow shallow (non-recursive) scan when scanning file storage
| * feat: allow files:scan --shallowBlaok2018-05-181-2/+2
| | | | | | | | Signed-off-by: Yuze Chi <i@blaok.me>
* | Request a valid property for DAV opendirRoeland Jago Douma2018-06-211-1/+1
| | | | | | | | | | | | | | | | Apperently Sabre and Onedrive are not friends when requesting a single 404 property. I need to dig deeper on why this is. Anyways requesting a valid property makes it work like a charm. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* | Fix listing s3 objects when using google cloud aws compatibilityRobin Appelman2018-06-111-0/+5
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | Make sure initial files can be properly createdRoeland Jago Douma2018-06-071-1/+2
| | | | | | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* | add azure unit tests with azuriteRobin Appelman2018-06-041-1/+28
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | add azure object storage backendRobin Appelman2018-06-041-0/+91
| | | | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl> Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>