aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Files
Commit message (Collapse)AuthorAgeFilesLines
* fix: Clean-up some remaining readdir calls with undesirable false evaluation ↵Josh Richards2024-11-132-2/+2
| | | | | | potential Signed-off-by: Josh Richards <josh.t.richards@gmail.com>
* Fix Undefined variable: response notice in case of non-404 errorbackport/49146/stable30Victor Dubiniuk2024-11-081-2/+3
| | | | Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
* fix: Fix copying or moving from shared groupfoldersDaniel Calviño Sánchez2024-10-291-2/+6
| | | | | | | | | | | | | | | When copying or moving between two local storages the source path (on disk) to copy or move from is got from the unjailed path of the source storage. However, if the source storage has more than one jail getting the unjailed path resolves the most external jail, but the source path needs to be got from the most internal jail instead (the one closer to the local storage). This can happen, for example, with a shared groupfolder: in that case there is an external jail for the shared storage, and one internal jail for the groupfolder storage wrapped by the shared storage. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* fix: Allow overriding shouldApplyQuota check from child classesbackport/48623/stable30Julius Knorr2024-10-281-1/+1
| | | | Signed-off-by: Julius Knorr <jus@bitgrid.net>
* Merge pull request #48077 from nextcloud/backport/47852/stable30Benjamin Gaussorgues2024-10-021-1/+1
|\
| * fix: misc code fixes around db shardingbackport/47852/stable30Robin Appelman2024-09-161-1/+1
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | fix(querybuilder): Fix boolean type so that oracle handles boolean wellbackport/48215/stable30Joas Schilling2024-09-251-1/+1
| | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* | Merge pull request #48233 from nextcloud/backport/48222/stable30Kate2024-09-201-2/+2
|\ \
| * | perf: reuse cache info we already have when moving to object storebackport/48222/stable30Robin Appelman2024-09-201-2/+2
| | | | | | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | | Merge pull request #48221 from nextcloud/backport/30/fix_move_on_same_bucketKate2024-09-201-0/+5
|\ \ \ | |/ / |/| |
| * | perf(ObjectStoreStorage): Improve (slow) move on same object bucketChristoph Fiehe2024-09-191-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | This commit fixes the issue #47856. When you upload a file into a group folder and when you use a single S3 bucket as primary storage, the final move operation hangs for a long time. In the background, Nextcloud initiates a copy-delete sequence from the bucket into the bucket, with causes a lot unnecessary overhead. Nextcloud thinks that the file must be imported to another storage and does not recognize that everything is done on the same object bucket. In that case, the import step can be completely skipped, which saves time, network bandwidth and reduces the load on the object storage. The behavior improves a lot with https://github.com/nextcloud/server/pull/46013. However, there are still some put messages that are being sent to the object storage when you use an object storage as primary storage and upload files into a group folder. Co-authored-by: Kate <26026535+provokateurin@users.noreply.github.com> Signed-off-by: Christoph Fiehe <c.fiehe@eurodata.de>
* | | fix: ensure parent folder exists when writing a file to object storageRobin Appelman2024-09-191-0/+4
| | | | | | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | | fix: verify that parent exists in cache when insertingRobin Appelman2024-09-191-0/+3
| | | | | | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | | fix: fix object store id for test object storeRobin Appelman2024-09-191-2/+2
| | | | | | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | | fix: cleanup objectstore file_put_contentRobin Appelman2024-09-191-7/+4
| | | | | | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | | fix: create intermediate directories for objectstore moveFromStorageRobin Appelman2024-09-191-0/+1
| | | | | | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | | fix: get source file before moving the cache item in objectstore moveFromStorageRobin Appelman2024-09-191-1/+5
|/ / | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | chore: improve hash_file php usage in Local Storagebackport/46218/stable30John Molakvoæ2024-09-161-8/+1
| | | | | | | | Co-authored-by: Ferdinand Thiessen <opensource@fthiessen.de> Signed-off-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
* | fix(files): Ensure that the hash method does not return nullLouis Chemineau2024-09-162-2/+10
|/ | | | | | | | To match https://github.com/nextcloud/server/blob/beececf66068f57c416225efcde9b44ce5c2e835/lib/private/Files/View.php#L1050 - Fix https://github.com/nextcloud/server/issues/44110 Signed-off-by: Louis Chemineau <louis@chmn.me>
* Merge pull request #47796 from nextcloud/backport/47756/stable30Andy Scherzinger2024-09-151-1/+2
|\ | | | | [stable30] fix(files): Check if target path is a descendant of the shared folder
| * fix(files): Check if the target path is a descendant of the shared folder pathbackport/47756/stable30Git'Fellow2024-09-061-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com> fix: tests Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com> fix: fix tests Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com> fix: add tests Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com> fix: tests
* | fix(S3ConfigTrait): Allow proxy field to take falsebackport/48016/stable30provokateurin2024-09-151-1/+1
| | | | | | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* | fix(Storage\Local): Do not call getSourcePath() on SplFileInfobackport/48015/stable30provokateurin2024-09-151-1/+1
| | | | | | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* | fix(files): Adjust Cache::searchQuery() parameter name to match interfacebackport/47954/stable30provokateurin2024-09-132-4/+4
| | | | | | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* | Merge pull request #47874 from nextcloud/backport/47853/stable30Andy Scherzinger2024-09-101-4/+4
|\ \ | | | | | | [stable30] fix: make swift connect exception message more informative
| * | fix: make swift connect exception message more informativeRobin Appelman2024-09-101-4/+4
| |/ | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* / fix: Only write once to template instead of create/copyJulius Knorr2024-09-101-3/+3
|/ | | | Signed-off-by: Julius Knorr <jus@bitgrid.net>
* fix: write object to the correct urn when moving from another storage to ↵Robin Appelman2024-09-041-0/+25
| | | | | | object store Signed-off-by: Robin Appelman <robin@icewind.nl>
* fix(files): Create non-existent parents of mountpointsprovokateurin2024-09-041-0/+9
| | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* fix: Do not fail to get internal path on NonExistingFile/NonExistingFolderJulius Härtl2024-09-032-0/+16
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* fix: Adjust filename validation messagesFerdinand Thiessen2024-08-301-3/+3
| | | | Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* fix: Also validate parent path in `verifyPath`Ferdinand Thiessen2024-08-282-3/+17
| | | | Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* fix: Allow read-only filename validation to allow reading filesFerdinand Thiessen2024-08-281-1/+12
| | | | | | Needed to read files with the "Windows compatibility" feature. Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* fix: Renaming does not need update but delete permissionsFerdinand Thiessen2024-08-281-5/+8
| | | | | | | Renaming is basically copy + delete (a move), so no need to update permissions. Especially if the node is in a invalid directory the node should be moveable but not editable. Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* chore: Apply php:cs recommendationsLouis Chemineau2024-08-281-9/+9
| | | | | | Signed-off-by: Louis Chemineau <louis@chmn.me> [skip ci]
* fix: hint storage id in more placesRobin Appelman2024-08-281-2/+5
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* feat: implement distributing partitioned queries over multiple shardsRobin Appelman2024-08-281-4/+92
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* fix: `FilenameValidator::isForbidden` should only check forbidden filesFerdinand Thiessen2024-08-221-9/+18
| | | | | | And not forbidden basenames as this is used for different purposes. Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* fix: use mountpoint from storage to find the encryption keysRobin Appelman2024-08-201-3/+3
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* feat: store the mountpoint of storages in the mount optionsRobin Appelman2024-08-201-2/+3
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Merge pull request #47044 from nextcloud/fix/accept-several-mounts-in-encryptionAndy Scherzinger2024-08-071-1/+1
|\ | | | | fix(encryption): Fix mountpoint check to accept if several are found
| * fix(encryption): Fix mountpoint check to accept if several are foundCôme Chilliet2024-08-051-1/+1
| | | | | | | | | | | | | | There is no strong requirement to have only one mount for a given storage id. Also the error in this case would be misleading. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | fix: ensure array returned from getMountsForFileId is continiousRobin Appelman2024-08-021-2/+2
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | fix(files): Fix incorrect keys by reindexingChristopher Ng2024-08-011-2/+2
| | | | | | | | Signed-off-by: Christopher Ng <chrng8@gmail.com>
* | Merge pull request #46379 from nextcloud/fix/folder-search-ownerFerdinand Thiessen2024-07-301-1/+24
|\ \ | |/ |/| fix: `OCP\Files\Node\Folder::search` was not setting the owner
| * fix: `OCP\Files\Node\Folder::search` was not setting the ownerFerdinand Thiessen2024-07-111-1/+24
| | | | | | | | | | | | The owner was not set on the file info causing e.g. webdav searches to never return the known owner. Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* | chore: fix some commentswithbest2024-07-291-1/+1
| | | | | | | | Signed-off-by: withbest <seekseat@outlook.com>
* | fix: Release directory iterator and thereby its potential directory lock ↵Dennis Verspuij2024-07-271-0/+1
| | | | | | | | | | | | prior to deleting a directory, to avoid e.g. "Text file busy" error with VirtualBox shared folder storage Signed-off-by: Dennis Verspuij <6680484+dennisverspuij@users.noreply.github.com>
* | Merge pull request #46672 from nextcloud/fix/preview-invalid-idAndy Scherzinger2024-07-251-3/+4
|\ \ | | | | | | Avoid using partial file info as valid one
| * | fix: Do not return partial file info if we have a cache entryJulius Härtl2024-07-221-3/+4
| | | | | | | | | | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>