aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Files
Commit message (Collapse)AuthorAgeFilesLines
* fix(dav): file drop nicknameskjnldsv10 hours2-0/+12
| | | | Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
* Merge pull request #52242 from nextcloud/artonge/fix/copy_subfolders_s3Louis3 days1-3/+3
|\
| * perf: set the folder size in the same query as we create itRobin Appelman8 days1-7/+3
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
| * fix(S3): Use original folder size during copyLouis Chemineau8 days1-0/+4
| | | | | | | | | | | | | | | | This prevent having copied folders with a wrongly set size of 0KB. - Fix https://github.com/nextcloud/server/issues/51916 Signed-off-by: Louis Chemineau <louis@chmn.me>
* | feat: move primary object store configuration to a single placeprimary-object-store-settingsRobin Appelman8 days3-144/+168
|/ | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* fix(node): emit hooks on `Node::copy()`Jonas9 days1-2/+2
| | | | | | | | | | | | | | | | | When calling `Files\Node\Node::copy()`, `Files\View::copy()` gets called, but `Files\View::fakeRoot` is empty so the hooks are not emitted if no path is given to `Files\View::shouldEmitHooks()`. This results in node-related events like `NodeCopiedEvent` not being fired when copying files via `Files\Node\Node::copy()`. `Files\View::shouldEmitHooks()` is given a path as parameter in almost all places except when called from the `copy()` function. This commit changes it and passes the copy target path. Fixes: nextcloud/collectives#1756 Signed-off-by: Jonas <jonas@freesources.org>
* feat(IUser): add `getQuotaBytes` method to get machine readable quotafeat/user-get-quota-bytesFerdinand Thiessen2025-05-221-2/+1
| | | | | | | | | | | Proper replacement for deprecated `OC_Util::getUserQuota`. Also we still use this in some cases we can now replace, moreover it just makes sense to have a machine readable format in the API instead of only the human readable format which is less precise. Alings also with `getQuota` of the quota storage, which already returned the machine readable format. Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* fix(SetupManager): Include home and root providers when registering mountsfix/setupmanager/home-root-providers-register-mountsprovokateurin2025-05-202-57/+68
| | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* feat: only load template fields when requestedElizabeth Danzberger2025-05-191-2/+63
| | | | Signed-off-by: Elizabeth Danzberger <lizzy7128@tutanota.de>
* feat(UserMountCache): Emit events for added, removed and updated mountsfeat/mountmanager/emit-eventsprovokateurin2025-05-191-7/+24
| | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* chore: move streamCopy implementation from `OC_Helper` to `OCP\Files`Ferdinand Thiessen2025-05-166-8/+15
| | | | | | | | | The function was already there but called the legacy version. So moved the implementation and migrated all usages of it. Sadly the interface was slightly different so adjusted it to be compatible with both legacy and the OCP one. Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* fix: improve error message when cache rename source can't be foundcache-rename-source-errorRobin Appelman2025-05-151-1/+1
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Merge pull request #52822 from nextcloud/feat/mime-namesJohn Molakvoæ2025-05-151-0/+22
|\
| * feat(core): add human readable mimesJohn Molakvoæ (skjnldsv)2025-05-141-0/+22
| | | | | | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* | Merge pull request #52812 from nextcloud/chore/oc-helper-rmdirrJohn Molakvoæ2025-05-141-2/+6
|\ \
| * | chore: move implementation from OC legacy to OCP\Fileschore/oc-helper-rmdirrFerdinand Thiessen2025-05-141-2/+6
| |/ | | | | | | | | | | | | | | | | - move implementation to the OCP variant that called the legacy before - add the missing deprecation notice - add missing parameter to align both signatures - use OCP\Files where this method is still used Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* | Merge pull request #48560 from nextcloud/fix/migrate-encryption-away-from-hooksCôme Chilliet2025-05-141-9/+20
|\ \ | | | | | | feat(encryption): Migrate from hooks to events
| * | fix(encryption): Only prevent cache deletion if target is not object store ↵Côme Chilliet2025-05-131-2/+3
| | | | | | | | | | | | | | | | | | in moveFromStorage Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
| * | fix(encryption): Improve Update class and event listeneningCôme Chilliet2025-05-131-2/+0
| | | | | | | | | | | | | | | | | | to avoid back&forth between path and Node object Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
| * | fix: Preserve file id when moving from object store even if encryption ↵Côme Chilliet2025-05-131-4/+15
| | | | | | | | | | | | | | | | | | wrapper is present Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
| * | fix: Fix mtime preservation when moving a directory across storages with ↵Côme Chilliet2025-05-131-1/+1
| | | | | | | | | | | | | | | | | | encryption registered Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
| * | fix(encryption): Fix filesize for part files in Encryption wrapperCôme Chilliet2025-05-131-2/+3
| |/ | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | Merge pull request #52775 from nextcloud/nested-jail-rootAndy Scherzinger2025-05-141-5/+8
|\ \ | | | | | | fix unjailedroot of nested jails if there are other wrappers in between
| * | fix: fix unjailedroot of nested jails if there are other wrappers in betweennested-jail-rootRobin Appelman2025-05-131-4/+7
| | | | | | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
| * | test: add test for nested cache jail unjailedrootRobin Appelman2025-05-131-1/+1
| | | | | | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | | Merge pull request #52800 from nextcloud/debt/noid/simple-file-generic-exceptionKate2025-05-141-2/+8
|\ \ \
| * | | fix: annotate possible exceptionsdebt/noid/simple-file-generic-exceptionDaniel Kesselberg2025-05-131-2/+8
| |/ / | | | | | | | | | | | | | | | File.getContent can throw a GenericFileException since https://github.com/nextcloud/server/pull/37943. Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* | / chore: deprecate \OC_Helper::canExecutechore/oc-helper-can-execFerdinand Thiessen2025-05-141-2/+5
| |/ |/| | | | | | | | | replace this legacy method with just the IBinaryFinder Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* | feat(FilenameValidator): allow to sanitize filenamesfeat/ocp-sanitize-filenamesFerdinand Thiessen2025-05-131-0/+37
|/ | | | | | Share the filename sanitizing with the OCP filename validator. Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* Merge pull request #51920 from nextcloud/newfolder-race-improvementsCôme Chilliet2025-05-131-2/+15
|\ | | | | fix: improve handling of newFolder race condition handling
| * fix: improve handling of newFolder race condition handlingnewfolder-race-improvementsRobin Appelman2025-05-081-2/+15
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | Merge pull request #52706 from nextcloud/info-file-more-encryption-checksRobin Appelman2025-05-121-0/+12
|\ \ | | | | | | feat: add more encryption checks to info:file
| * | feat: add more encryption checks to info:fileinfo-file-more-encryption-checksRobin Appelman2025-05-091-0/+12
| |/ | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | Merge pull request #52665 from nextcloud/mountpoint-mkdir-quotaRobin Appelman2025-05-122-0/+19
|\ \ | | | | | | fix: create mountpoint folder even if the user has a quota of 0
| * | fix: create mountpoint folder even if the user has a quota of 0mountpoint-mkdir-quotaRobin Appelman2025-05-082-0/+19
| |/ | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* / fix: throw a better error if we can't get the encrypted header sizeencryption-no-header-size-errorRobin Appelman2025-05-091-0/+11
|/ | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Merge pull request #52047 from nextcloud/sub-mount-filter-no-storageKate2025-05-061-2/+1
|\
| * fix: don't construct storage when checking if a sub-mount is applicablesub-mount-filter-no-storageRobin Appelman2025-04-081-2/+1
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | Merge pull request #52441 from nextcloud/scan-locked-errorKate2025-05-062-6/+15
|\ \
| * | fix: better error message when trying to scan a folder that is already being ↵scan-locked-errorRobin Appelman2025-04-252-6/+15
| | | | | | | | | | | | | | | | | | scanned Signed-off-by: Robin Appelman <robin@icewind.nl>
* | | Merge pull request #51779 from nextcloud/object-store-filenameKate2025-05-063-19/+56
|\ \ \
| * | | feat: store original storage id and path in object store metadataobject-store-filenameRobin Appelman2025-03-313-3/+28
| | | | | | | | | | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
| * | | feat: more generic way of passing metadata to object storage backends for ↵Robin Appelman2025-03-312-20/+32
| | | | | | | | | | | | | | | | | | | | | | | | new objects Signed-off-by: Robin Appelman <robin@icewind.nl>
* | | | fix: Forward 'extra' argument when optimizing queryartonge/fix/forward_extraLouis Chemineau2025-04-292-2/+2
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows DAV SEARCH queries containing optimizable comparisons on files metadata like: ```xml <d:or> <d:eq> <d:prop> <nc:metadata-photos-place /> </d:prop> <d:literal>La Valette-du-Var</d:literal> </d:eq> <d:eq> <d:prop> <nc:metadata-photos-place /> </d:prop> <d:literal>Évenos</d:literal> </d:eq> </d:or> ``` Signed-off-by: Louis Chemineau <louis@chmn.me>
* | | fix(objectstorage): add retry attempts to S3 connectionfix/51833/add-retries-to-s3-clientAnna Larch2025-04-231-0/+4
| | | | | | | | | | | | Signed-off-by: Anna Larch <anna@nextcloud.com>
* | | Merge pull request #51020 from nextcloud/artonge/fix/transfer_ownershipLouis2025-04-141-1/+12
|\ \ \
| * | | fix: Transfer ownership with S3 as primaryartonge/fix/transfer_ownershipLouis Chemineau2025-04-011-1/+12
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using S3 as primary storage, transferring ownership with the `--move` option fail with the following error: `SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '8-45b963397aa40d4a0063e0d85e4fe7a1' for key 'fs_storage_path_hash'` The `--move` option moves the entire home folder from one account to another. The error means that the move failed because the destination folder already exist in `oc_filecache`. - With S3 as primary storage, folders only exists as entries in `oc_filecache`. - With S3 as primary storage, `moveFromStorage(...)` only moves the cache entry, as nothing needs to be moved on disk. This cache move does not delete potentially pre-existing destination folder. - With Local storage, `moveFromStorage(...)` calls `rename(...)` which delete pre-existing folder. - `transfer(...)`: https://github.com/nextcloud/server/blob/687a4d9ac7fcdbd935f81a0def567a1092306f7a/apps/files/lib/Service/OwnershipTransferService.php#L112 - `oneTimeUserSetup(...)`: https://github.com/nextcloud/server/blob/687a4d9ac7fcdbd935f81a0def567a1092306f7a/lib/private/Files/SetupManager.php#L261-L262 - `mkdir(...)`: https://github.com/nextcloud/server/blob/687a4d9ac7fcdbd935f81a0def567a1092306f7a/lib/private/Files/ObjectStore/ObjectStoreStorage.php#L91-L135 - `moveFromStorage(...)`: https://github.com/nextcloud/server/blob/687a4d9ac7fcdbd935f81a0def567a1092306f7a/lib/private/Files/ObjectStore/ObjectStoreStorage.php#L635-L636 Delete pre-existing folder in `moveFromStorage(...)` Signed-off-by: Louis Chemineau <louis@chmn.me>
* | | fix: Catch old cached paths and fetch the new onefix/cache-hit-getFirstNodeByIdJulius Knorr2025-04-081-5/+9
| | | | | | | | | | | | Signed-off-by: Julius Knorr <jus@bitgrid.net>
* | | fix: Proper order for checking path prefix for getting file by id from cacheJulius Knorr2025-04-071-1/+1
| |/ |/| | | | | Signed-off-by: Julius Knorr <jus@bitgrid.net>
* | fix(cache): always require updates if mtime is nullfix/require-update-if-mtime-is-nullFerdinand Thiessen2025-04-041-1/+1
| | | | | | | | | | | | | | | | | | | | - Resolves https://github.com/nextcloud/server/issues/51941 Due to strong typings we introduced the parameter needs to be an integer. Previously it was `null` which was equal to `0`. So if there is no storage mtime we need to update the cache. Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>