Commit Graph

419 Commits (a784bdadcf420a0ceeaeb9f22234b1b8b97177b2)

Author SHA1 Message Date
Robin Appelman dbf084054e chore: better type hints for `getAvailability`
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-11-12 17:45:55 +07:00
Côme Chilliet d84f1466e0 fix: Fix crash in files_version about uninitialized property
Fix "Typed property OC\\Files\\Cache\\Cache::$storage must not be accessed before initialization"

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-10-14 18:32:37 +07:00
Marcel Klehr 552ef44568 fix(FileAccess): Make getAncestorInStorage pass sharding tests
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
2025-10-09 07:51:58 +07:00
Marcel Klehr 38f2bf6f98 fix(FileAccess): Try to fix type error
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
2025-10-09 07:51:58 +07:00
Marcel Klehr bb82cff328 fix(FileAccess): Chunk parent query
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
2025-10-09 07:51:58 +07:00
Marcel Klehr 5117f9ab1e fix(FileAccess): Make getByAncestorInStorage sharding ready
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
2025-10-09 07:51:58 +07:00
provokateurin 42f8ebaf75 fix(files): Always return a valid mimetype
Signed-off-by: provokateurin <kate@provokateurin.de>
2025-10-06 11:24:18 +07:00
provokateurin 9985baeb09 fix(files): Stop overwriting scan_permissions
Signed-off-by: provokateurin <kate@provokateurin.de>
2025-09-29 16:12:24 +07:00
Louis Chemineau 6defeaa119 fix(Updater): Lower deadlock log level from warning to info
If this is safe to ignore, then it does not make sense to keep warning the admins.

Signed-off-by: Louis Chemineau <louis@chmn.me>
2025-09-16 16:19:39 +07:00
Côme Chilliet feef3cfa7d fix(encryption): Correctly set encrypted to 0 when copying
If encryption got disabled, copying should set encrypted to 0 for the
 new unencrypted copy. For instance when using encryption:decrypt-all

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-09-11 21:18:37 +07:00
Carl Schwan c4e6fbdae7 fix(query-builder): Don't catch UniqueConstraintViolationException
UniqueConstraintViolationException is no longer throw directly but
instead is now wrapped inside a \OCP\DB\Exception. So check the
exception reason.

Signed-off-by: Carl Schwan <carl.schwan@nextclound.com>
2025-09-02 11:55:58 +07:00
Carl Schwan c21b8169ff refactor(querybuilder): Port away from qb::execute() in lib/
Replace by either executeStatement or executeQuery

Signed-off-by: Carl Schwan <carl.schwan@nextclound.com>
2025-09-02 11:55:56 +07:00
Robin Appelman 1a716578fd
fix: fix moving cache items from cache jail with sharding
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-08-22 19:21:31 +07:00
Robin Appelman 01147cf872 fix: add missing color select to tags usage query
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-08-01 02:47:04 +07:00
Marcel Klehr 43be97de08 fix(FileAccess): Use one param for rewriting home dirs and excluding non-user files mounts
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
2025-07-15 09:15:16 +07:00
Julien Veyssier cb221c8211 fix(FileAccess*): Change the way home dir root is found, remove the excludeTrashbinMounts param of getDistinctMounts
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
2025-07-15 09:15:16 +07:00
Julien Veyssier a2aeec0f4b fix(FileAccess*): Adress review comments
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
2025-07-15 09:15:16 +07:00
Julien Veyssier 28dc4a299e fix(FileAccess): exclude trashbin nodes on the oc_filecache query, there is no trashbin mount
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
2025-07-15 09:15:16 +07:00
Julien Veyssier 7e986988fe fix(FileAccess*): Adress review comments
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
2025-07-15 09:15:16 +07:00
Marcel Klehr 131125bbb7 fix(FileAccessTest): Adress review comments
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
2025-07-15 09:15:16 +07:00
Marcel Klehr 895160a1d3 fix(FileAccessTest): Do not use LIMIT in subquery
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
2025-07-15 09:15:16 +07:00
Marcel Klehr 34b3f7553b fix(FileAccess#getDistinctMounts): Order results deterministically
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
2025-07-15 09:15:16 +07:00
Marcel Klehr 10cc43041b fix(FileAccess#getByAncestorInStorage): Use a subquery to fix tests
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
2025-07-15 09:15:16 +07:00
Marcel Klehr d67c877ac5 fix(FileAccess): Add tests
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
2025-07-15 09:15:16 +07:00
Marcel Klehr 5689af5a94 fix(FileAccess): Run cs:fix
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
2025-07-15 09:15:16 +07:00
Marcel Klehr d8c6f8d18e fix(FileAccess): Address review comments
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
2025-07-15 09:15:16 +07:00
Marcel Klehr 611d83aa6a fix: Fix psalm issues
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
2025-07-15 09:15:16 +07:00
Marcel Klehr 3eef614769 feat(IFileAccess#getMounts): Add new method to retrieve all distinct mounts
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
2025-07-15 09:15:16 +07:00
Marcel Klehr 845b78086b feat(IFileAccess#getByAncestorInStorage): Add new method to retrieve all files in a mount
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
2025-07-15 09:15:16 +07:00
Ferdinand Thiessen 5981b7eb51
chore: apply new CSFixer rules
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>

# Conflicts:
#	apps/settings/lib/SetupChecks/PhpOpcacheSetup.php
2025-07-01 16:26:50 +07:00
Joas Schilling f230abeef8
fix: Run cleanByMoundId query on all shards
Signed-off-by: Joas Schilling <coding@schilljs.com>
2025-06-06 14:36:34 +07:00
Robin Appelman 5329c373cc fix: improve error message when cache rename source can't be found
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-05-15 15:06:55 +07:00
Robin Appelman 1e72620169 fix: fix unjailedroot of nested jails if there are other wrappers in between
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-05-13 18:29:00 +07:00
Robin Appelman 0001c22668 test: add test for nested cache jail unjailedroot
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-05-13 18:29:00 +07:00
Robin Appelman bb4cf2830a
fix: better error message when trying to scan a folder that is already being scanned
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-04-25 18:40:03 +07:00
Ferdinand Thiessen 3a09acebd2
fix(cache): always require updates if mtime is null
- 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>
2025-04-04 13:41:32 +07:00
Robin Appelman 2e9222a29a
feat: add getParentId to ICacheEntry
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-03-28 16:47:07 +07:00
Benjamin Gaussorgues 9bdee76535
perf(files): faster query to fetch incomplete directories
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
2025-02-13 10:11:02 +07:00
Robin Appelman 2786ca579a
fix: don't use cached root info from shared cache if the watcher has detected an update
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-02-06 19:41:43 +07:00
Ferdinand Thiessen b48ee2e924
fix: Harden files scanner for invalid null access
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>
2025-01-28 20:08:46 +07:00
Louis Chemineau a635710117
fix: Metadata field search
Signed-off-by: Louis Chemineau <louis@chmn.me>
2025-01-20 14:41:55 +07:00
Côme Chilliet 08c7001a04 fix: Fix copying to the root of another mountpoint
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-12-17 18:24:35 +07:00
Daniel Kesselberg 44e4fc5d41
Revert "fix: don't recalculate folder size in Cache::delete if the entry didn't exist"
This reverts commit 5ca9d884d7.

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2024-12-16 14:03:33 +07:00
Robin Appelman c21888e6ae
Merge pull request #47342 from nextcloud/cache-delete-notfound-size
fix: don't recalculate folder size in Cache::delete if the entry didn't exist
2024-12-12 17:54:48 +07:00
John Molakvoæ 3baa91d842
Merge pull request #40394 from nextcloud/updater-change-mimetype-objectstore 2024-12-11 08:40:58 +07:00
Robin Appelman e7b882dd22
fix: only do cache copy in updater if the parent folder should be in cache
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-12-06 17:47:00 +07:00
Robin Appelman 37199779de
fix: fix mimetype not being updated when changing file extention on object store
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-12-05 18:05:13 +07:00
Robin Appelman c2f474ff49
Merge pull request #48769 from nextcloud/copy-share-unmasked
Fix incorrect permissions when copying shared files
2024-12-04 20:11:41 +07:00
John Molakvoæ b4c43bb811
Merge pull request #49551 from nextcloud/dont-propagate-future-time 2024-12-04 20:11:23 +07:00
Robin Appelman 6419de7acc fix: use scan_permissions when copying cache items
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-12-04 19:19:08 +07:00