aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Files
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* | feat: add debug logging for adding/removing items from the user mounts cacheusermountcache-loggingRobin Appelman2025-04-031-0/+3
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | refactor(IMimeTypeDetector): use consistent capitalizationchore/consistent-namingFerdinand Thiessen2025-04-021-51/+52
|/ | | | | | | | - use consistantly `mimeType` as it is called MIME type - fix issues where implementation and interface had different parameter names (this is an issue since PHP has named parameters). Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* feat: add command to list objectsRobin Appelman2025-03-311-2/+2
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* feat: add command to get object metadataRobin Appelman2025-03-311-3/+39
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* feat: add getParentId to ICacheEntryRobin Appelman2025-03-281-0/+4
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* fix(IFilenameValidator): correctly handle case insensitivityfix/file-name-validator-case-sensitivityFerdinand Thiessen2025-03-211-5/+3
| | | | | | | | - forbidden names and forbidden base names are case **insensitive** so we need to check all lowercase here. - add test that config value is also read case insensitive. Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* fix(IMimeTypeDetector): use correct return typefix/IMimeTypeDetector-typesFerdinand Thiessen2025-03-181-2/+2
| | | | | | | | | | | | | | In PHP array keys that are integers are always kept as integer, meaning the type of the key of `$a = ["1" => "one"]` will be integer not string. While are hacks to circumvent this (case std object with string keys to an assoc. array) those hacks are performance wise awefull and also not needed as in PHP you can always access that element with `$a[1]` or `$a["1"]`. So TL;DR;: do not lie about return types. Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* Merge pull request #51333 from nextcloud/filePointerCheckGit'Fellow2025-03-171-8/+8
|\ | | | | fix(files): Make sure file pointer exists
| * fix(files): Make sure file pointer existsfilePointerCheckGit'Fellow2025-03-071-8/+8
| | | | | | Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
* | fix: fix getNodeFromCacheEntryAndMount using relative pathRobin Appelman2025-03-101-2/+2
|/ | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Merge pull request #50702 from ↵Andy Scherzinger2025-03-051-2/+4
|\ | | | | | | | | Institutional-Investment-Group/feat/support-aws-session-token9 feat(object_store): Add support for session token (STS) in AWS credentials
| * Merge branch 'master' into feat/support-aws-session-tokenHector Manuel2025-03-045-31/+30
| |\
| * | feat(object_store): Add support for session token in AWS credentialsHector Valcarcel2025-02-061-2/+4
| | | | | | | | | | | | | | | | | | - Pass session token, either null or with value, to the AWS Credentials constructor Signed-off-by: Hector Valcarcel <hmvalcarcel@gmail.com>
* | | fix: No IFactory in constructorbugfix/50619/no-session-work-in-constructorMarcel Müller2025-03-051-3/+1
| | | | | | | | | | | | Signed-off-by: Marcel Müller <marcel-mueller@gmx.de>
* | | fix(files): Don't do session related work in the constructor of the ViewJoas Schilling2025-03-051-10/+10
| |/ |/| | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* | perf(files): faster query to fetch incomplete directoriesperf/improve-incomplete-scanBenjamin Gaussorgues2025-02-132-15/+6
| | | | | | | | Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
* | Merge pull request #50498 from nextcloud/bug/48678/restore-dav-error-response-2Daniel2025-02-111-16/+8
|\ \ | | | | | | Don't rethrow a type error
| * | fix: make locked exception path relative to the viewRobin Appelman2025-02-111-16/+8
| |/ | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* / fix: don't use cached root info from shared cache if the watcher has ↵Robin Appelman2025-02-062-0/+16
|/ | | | | | detected an update Signed-off-by: Robin Appelman <robin@icewind.nl>
* fix: psalm and OCP @since declarationsfix/mime-intJohn Molakvoæ2025-02-061-2/+2
| | | | Co-authored-by: Ferdinand Thiessen <opensource@fthiessen.de> Signed-off-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
* fix: make sure we process mime extensions as stringskjnldsv2025-02-051-4/+11
| | | | Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
* fix(s3): treat empty sse_c_key as not setfeat/s3/sse-cRichard Steinmetz2025-01-281-1/+1
| | | | | Co-authored-by: Christian Becker <christian@dabecka.de> Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
* fix: Harden files scanner for invalid null accessFerdinand Thiessen2025-01-286-172/+170
| | | | | | Co-authored-by: Ferdinand Thiessen <opensource@fthiessen.de> Co-authored-by: Kate <26026535+provokateurin@users.noreply.github.com> Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* Merge pull request #50273 from nextcloud/artonge/fix/metadata_field_searchFerdinand Thiessen2025-01-251-6/+11
|\ | | | | fix: Metadata field search
| * fix: Metadata field searchartonge/fix/metadata_field_searchLouis Chemineau2025-01-201-6/+11
| | | | | | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
* | fix(TemplateManager): Remove warning messageGit'Fellow2025-01-201-1/+0
|/ | | Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
* fix: php lint extra tab fixfix/conversion-extensionJohn Molakvoæ2025-01-171-1/+0
| | | | Co-authored-by: Ferdinand Thiessen <opensource@fthiessen.de> Signed-off-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
* fix(files): more conversion tests and translate error messagesskjnldsv2025-01-171-9/+35
| | | | Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
* chore: remove unnecessary methodfix/file-conversion-missing-extensionElizabeth Danzberger2025-01-161-17/+0
| | | | Signed-off-by: Elizabeth Danzberger <lizzy7128@tutanota.de>
* fix: prevent missing target file extensionElizabeth Danzberger2025-01-161-12/+8
| | | | Signed-off-by: Elizabeth Danzberger <lizzy7128@tutanota.de>
* fix(files): conversion api simplification and conflict checkskjnldsv2025-01-161-36/+61
| | | | Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
* feat(api): File conversion APIElizabeth Danzberger2025-01-151-0/+152
| | | | Signed-off-by: Elizabeth Danzberger <lizzy7128@tutanota.de>
* fix: use proper way to get numeric storage id for mountpointRobin Appelman2025-01-131-1/+1
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* fix(PathHelper): Remove null bytes when normalizing pathfix/files_sharing/harden-apiprovokateurin2025-01-131-0/+2
| | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* Merge pull request #49903 from nextcloud/encryption-version-versionCôme Chilliet2025-01-071-0/+1
|\ | | | | fix: restore updated encrypted version when copying versions
| * fix: restore updated encrypted version when copying versionsencryption-version-versionRobin Appelman2025-01-031-0/+1
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | fix: explicitly ignore nested mounts when transfering ownershipmount-move-checksRobin Appelman2025-01-061-3/+9
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | fix: translate mount move error messagesRobin Appelman2025-01-031-11/+36
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | fix: improve checks for moving shares/storages into other mountsRobin Appelman2025-01-031-15/+51
|/ | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* fix: don't skip scanner users filesystem if they have a mountpoint at ↵Robin Appelman2024-12-271-2/+7
| | | | | | /<user>/files/ Signed-off-by: Robin Appelman <robin@icewind.nl>
* fix: Fix copying to the root of another mountpointfix/fix-copy-to-mountpoint-rootCôme Chilliet2024-12-171-0/+3
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* fix(View): Catch exceptions when executing mkdir for non-existent parentsfix/view/catch-mkdir-exception-non-existent-parentsprovokateurin2024-12-161-4/+11
| | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* Revert "fix: don't recalculate folder size in Cache::delete if the entry ↵ci/revert/47342Daniel Kesselberg2024-12-161-0/+3
| | | | | | | | didn't exist" This reverts commit 5ca9d884d78fd4439a74dde02fdcafb3ac7a40f4. Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* fix(TemplateManager): Make sure TemplateFolder is a FolderensureTemplateFolderGit'Fellow2024-12-131-2/+6
| | | | Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>