aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Files/View.php
Commit message (Collapse)AuthorAgeFilesLines
...
* Unlock when promoting to exclusive lock failsAshod Nakashian2020-11-071-1/+7
| | | | | | | | | | | | | | | | In certain cases changeLock to EXCLUSIVE fails and throws LockedException. This leaves the file locked as SHARED in file_put_contents, which prevents retrying (because on second call file_put_contents takes another SHARED lock on the same file, and changeLock doesn't allow more than a single SHARED lock to promote to EXCLUSIVE). To avoid this case, we catch the LockedException and unlock before re-throwing. Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
* optimize View::getPath if we already know the storage idRobin Appelman2020-09-161-11/+18
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Update license headers for 19Christoph Wurst2020-04-291-0/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update View.phpScott Dutton2020-04-151-2/+2
|
* Increase max readScott Dutton2020-04-121-2/+2
| | | | | | 8kb is very low, especially given this will be local files Signed-off-by: Scott Dutton <scott@exussum.co.uk>
* Format control structures, classes, methods and functionChristoph Wurst2020-04-101-5/+2
| | | | | | | | | | | | | | | To continue this formatting madness, here's a tiny patch that adds unified formatting for control structures like if and loops as well as classes, their methods and anonymous functions. This basically forces the constructs to start on the same line. This is not exactly what PSR2 wants, but I think we can have a few exceptions with "our" style. The starting of braces on the same line is pracrically standard for our code. This also removes and empty lines from method/function bodies at the beginning and end. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use elseif instead of else ifChristoph Wurst2020-04-101-4/+4
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Remove spaces after method or function callChristoph Wurst2020-04-091-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Unify function spacing to PSR2 recommendationChristoph Wurst2020-04-091-2/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update the license headers for Nextcloud 19Christoph Wurst2020-03-311-0/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use the short array syntax, everywhereChristoph Wurst2020-03-261-44/+44
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Actually check if the owner is not nullRoeland Jago Douma2020-03-161-0/+5
| | | | | | | Else this can error out on storages that do not have an owner (e.g. groupfolders). Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* pass the existing locks info when making locked exception with absolute pathsRobin Appelman2020-03-021-4/+7
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Don't create invalid usersJoas Schilling2020-02-121-1/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Update license headersChristoph Wurst2019-12-051-3/+3
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Properly anotate LockedException in files node apiJulius Härtl2019-11-281-9/+15
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Some php-cs fixesRoeland Jago Douma2019-11-221-1/+0
| | | | | | | | | | | * 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>
* Merge pull request #15832 from ↵Roeland Jago Douma2019-06-251-2/+2
|\ | | | | | | | | nextcloud/bugfix/noid/fulltext-search-groupfolders Fix full text search for groupfolders
| * Fix full text search for groupfoldersMorris Jobke2019-06-171-2/+2
| | | | | | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* | handle storage exceptions when trying to set mtimeRobin Appelman2019-06-061-1/+6
|/ | | | | | | not all storage backends can handle setting the mtime and they might not always handle that error correctly. Signed-off-by: Robin Appelman <robin@icewind.nl>
* search files by id in shared storages lastRobin Appelman2019-05-281-0/+8
| | | | | | this prevents unneeded recursion when the file is not in the share Signed-off-by: Robin Appelman <robin@icewind.nl>
* always allow moving mountpoints inside the same mountpointRobin Appelman2019-03-191-11/+6
| | | | | | even if that mountpoint isn't normally a valid target for moving mounts into Signed-off-by: Robin Appelman <robin@icewind.nl>
* Remove spaming debug logsJoas Schilling2019-03-151-1/+0
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Properly handle null as ownerId if file system access is denied by access tokenJulius Härtl2019-03-011-2/+6
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Add dispatcher events to User and Group objectsJoas Schilling2019-03-011-1/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* cleanup shared lock if changing to exclusive lock failedRobin Appelman2019-01-221-1/+7
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* 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>
* 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>
* Add resource type phpDoc for putContent methodsJulius Härtl2018-06-261-1/+1
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Debug log file not found when getting fileinfoRobin Appelman2018-05-041-0/+1
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Merge pull request #9387 from nextcloud/getcachentry-lockMorris Jobke2018-05-041-3/+1
|\ | | | | remove unneeded locks in getCacheEntry
| * remove unneeded locks in getCacheEntryRobin Appelman2018-05-041-3/+1
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | Log mount and storage issues in getFileInfoRobin Appelman2018-05-021-0/+3
|/ | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* move log constants to ILoggerArthur Schiwon2018-04-261-4/+5
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Remove unneeded semicolon and parenthesesMorris Jobke2018-01-261-2/+2
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Merge pull request #8054 from nextcloud/substr-use-indexMorris Jobke2018-01-261-3/+3
|\ | | | | Use index based string access for substr with length of 1
| * Use index based string access for substr with length of 1Morris Jobke2018-01-261-3/+3
| | | | | | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* | Return value immediately instead of assigning to a one-time variableMorris Jobke2018-01-261-6/+3
|/ | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Properly log the full exception instead of only the messageMorris Jobke2018-01-231-6/+5
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* handle not found mounts when cleaning avatarsRobin Appelman2017-12-111-0/+6
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Merge pull request #7014 from nextcloud/rename-locksMorris Jobke2017-11-091-83/+86
|\ | | | | Unlock files even if an exception occurs while renaming
| * Unlock files even if an exception occurskorelstar2017-11-031-83/+86
| | | | | | | | Signed-off-by: Kristof Hamann <korelstar@users.noreply.github.com>
* | Update license headersMorris Jobke2017-11-061-2/+0
| | | | | | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* | Fix seeking on object storageMorris Jobke2017-10-271-2/+22
|/ | | | | | Seeking is not needed if the $from is 0, because then the pointer is already at the correct position. Additionally another fallback is added, that if the fseek fails it just uses an fread to skip the beginning of the file until it is at the correct position. This skipping is done with a chunked fread. Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Don't lock in the appdata_ directoryJoas Schilling2017-08-101-1/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Still throw a locked exception when the path is not relative to $user/files/Joas Schilling2017-08-101-5/+12
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Merge pull request #5596 from nextcloud/mount-renameMorris Jobke2017-07-211-8/+12
|\ | | | | Fix renaming of non-renamble mounts
| * non movable mounts can not be movedRobin Appelman2017-07-171-8/+12
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | Remove unused functionsLukas Reschke2017-07-191-9/+0
| | | | | | | | Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* | Run phan over code baseLukas Reschke2017-07-191-1/+1
|/ | | | Signed-off-by: Lukas Reschke <lukas@statuscode.ch>