Commit Graph

100 Commits

Author SHA1 Message Date
Salvatore Martire
d400dd4167 fix: avoid recomputing list of mounts by provider
Signed-off-by: Salvatore Martire <4652631+salmart-dev@users.noreply.github.com>
2026-02-13 16:41:44 +01:00
provokateurin
f12cecb684 feat(rector): Enable SafeDeclareStrictTypesRector
Signed-off-by: provokateurin <kate@provokateurin.de>
2026-02-09 10:59:31 +01:00
Carl Schwan
3979c493f9 refactor: Apply second batch of comments
Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2026-02-06 13:52:51 +01:00
Carl Schwan
7b6078875b refactor: Run rector on lib/private
Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2026-02-06 13:50:18 +01:00
Andy Scherzinger
08e1d9b83e Merge pull request #58025 from nextcloud/carl/refactor-share-mountprovider
refactor(mount-provider): Refactor share mount provider
2026-02-05 11:50:40 +01:00
Robin Appelman
72150d6deb fix: getById: don't setup for all users with access by default
Signed-off-by: Robin Appelman <robin@icewind.nl>
2026-02-04 18:23:34 +01:00
Carl Schwan
8f81b91733 refactor(mount-provider): Refactor share mount provider
- Add more precise types
- Remove dead code

Signed-off-by: Carl Schwan <carlschwan@kde.org>
2026-02-04 12:46:14 +01:00
Carl Schwan
04ddeeec4a perf(MountManager): use binary search to find mount in path
Signed-off-by: Carl Schwan <carlschwan@kde.org>
2026-01-29 11:41:58 +01:00
Carl Schwan
eadcd1cc84 refactor: Use str_starts_with
Co-authored-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2026-01-16 10:58:16 +01:00
Carl Schwan
27339601f6 perf(View): Optimize getDirectoryContent hot-loop
Signed-off-by: Carl Schwan <carlschwan@kde.org>
2026-01-14 18:03:51 +01:00
Carl Schwan
b0357663b9 perf(preview): Optimize migration and simplify DB layout
* Simplify migration by not moving the actual files and just updating
  the DB
* Don't store the storageid in the preview table as it is not needed
* Start adding tests

Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2025-10-06 13:37:15 +02:00
Ferdinand Thiessen
660f3f6fd1 refactor: use logical && || instead of weak and or operators
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-09-27 23:02:18 +02:00
Robin Appelman
7599162c7b feat: move primary object store configuration to a single place
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-05-28 15:32:31 +02:00
Robin Appelman
f20c483513 fix: use proper way to get numeric storage id for mountpoint
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-01-13 17:59:17 +01:00
provokateurin
9836e9b164 chore(deps): Update nextcloud/coding-standard to v1.3.1
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-09-19 14:21:20 +02:00
Daniel Kesselberg
af6de04e9e style: update codestyle for coding-standard 1.2.3
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2024-08-25 19:34:58 +02:00
Andy Scherzinger
dae7c159f7 chore: Add SPDX header
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2024-05-24 13:11:22 +02:00
Côme Chilliet
ec5133b739 fix: Apply new coding standard to all files
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-04-02 14:16:21 +02:00
Joas Schilling
aa5f037af7 chore: apply changes from Nextcloud coding standards 1.1.1
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
2023-11-23 10:36:13 +01:00
Robin Appelman
dec880b285 optimize builtin storage wrappers
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-11-08 15:26:10 +01:00
Robin Appelman
efe68d012c Merge pull request #39044 from nextcloud/more-empty-mount-checking
Fix root mounts not being setup in some cases
2023-10-24 16:54:05 +02:00
Jonas
7441ce2b11 enh(IMountManager): Add method to get MountPoint from CachedMountInfo
Signed-off-by: Jonas <jonas@freesources.org>
2023-10-23 20:50:24 +02:00
Hamid Dehnavi
ea06cf2f39 Convert isset ternary to null coalescing operator
Signed-off-by: Hamid Dehnavi <hamid.dev.pro@gmail.com>
2023-09-28 17:44:19 +03:30
Robin Appelman
5685d68bd3 add more checks to ensure mounts aren't empty
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-09-12 16:50:24 +02:00
Robin Appelman
fda820a64d expose MovableMount in public interface
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-07-28 14:42:09 +02:00
Faraz Samapoor
e7cc7653b8 Refactors "strpos" calls in lib/private to improve code readability.
Signed-off-by: Faraz Samapoor <fsamapoor@gmail.com>
2023-05-15 15:17:19 +03:30
Côme Chilliet
426c0341ff Use typed version of IConfig::getSystemValue as much as possible
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-04-05 12:50:08 +02:00
Robin Appelman
9f3dbb699a fix tests
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-02-07 15:50:10 +01:00
Robin Appelman
e3bafcc7a8 cache numeric id in mountpoint
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-02-06 18:20:08 +01:00
Robin Appelman
9281359fa4 deduplicate getStorage() logic in Mount\Manager
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-02-06 18:17:40 +01:00
Robin Appelman
43589312cc dont delegate Mount\Manager::getByNumericId to getByStorageId
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-02-06 18:16:23 +01:00
Carl Schwan
d5c23dbb9f Move CappedMemoryCache to OCP
This is an helpful helper that should be used in more place than just
server and this is already the case with groupfodlers, deck, user_oidc
and more using it, so let's make it public

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-07-14 15:54:31 +02:00
Daniel Kesselberg
f399fd41ec Fix docblock for return type
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2022-05-27 20:05:46 +02:00
Côme Chilliet
069477e608 Migrate more classes of lib/private to LoggerInterface
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-04-26 16:52:52 +02:00
Robin Appelman
8b12c75ca2 don't do a full setup for findByStorageId
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-04-04 15:40:20 +02:00
Robin Appelman
99ac46d8f5 allow getting mounts by providers
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-04-04 14:57:56 +02:00
Côme Chilliet
765999f454 Merge pull request #31609 from nextcloud/fix/migrate-away-from-ilogger
Migrate from ILogger to LoggerInterface in lib/private
2022-03-29 09:39:38 +02:00
Robin Appelman
19c64cf8b6 setup only relevant mounts when possible
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-03-24 17:01:46 +01:00
Côme Chilliet
6be7aa112f Migrate from ILogger to LoggerInterface in lib/private
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-03-24 16:21:25 +01:00
Robin Appelman
917c74e214 type fixes
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-03-04 16:30:16 +01:00
Robin Appelman
d81713e5c1 simplify setup of circular SetupManager<->Manager
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-03-04 16:30:09 +01:00
Robin Appelman
6c1d051ecd add template annotations to CappedMemoryCache
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-03-04 16:30:06 +01:00
Robin Appelman
22875bf367 move logic to decide what to setup to setupmanager
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-03-04 16:30:03 +01:00
Robin Appelman
5c0fe93498 move teardown logic to SetupManager
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-03-04 16:29:50 +01:00
Robin Appelman
15ff65c12f start moving filesystem setup logic to it's own place
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-03-04 16:29:47 +01:00
Robin Appelman
7630d7a934 more type hints for ICachedMountInfo and IMountManager
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-03-04 16:28:11 +01:00
Robin Appelman
8b22a463e9 Merge pull request #31266 from nextcloud/root-setup-mountprovider
move root mount setup to mountproviders
2022-03-04 13:44:05 +00:00
Joas Schilling
88f4e972c5 Don't set up full filesystem to check for certificates
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-02-26 00:40:12 +01:00
Robin Appelman
8b7c8447a0 move root mount setup to mountproviders
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-02-24 17:21:42 +01:00
Robin Appelman
cfb7923e08 store mountprovider for each mount in the mounts table
this enabled more fine grained filesystem setup

Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-02-23 18:02:33 +01:00