Commit Graph

32 Commits (296096e06996aee1a06d901b99adde5f04688f58)

Author SHA1 Message Date
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 +07: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 +07: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 +07:00
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 +07: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 +07: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 +07: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 +07:00
Robin Appelman 99ac46d8f5
allow getting mounts by providers
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-04-04 14:57:56 +07:00
Robin Appelman 19c64cf8b6
setup only relevant mounts when possible
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-03-24 17:01:46 +07:00
Robin Appelman 917c74e214
type fixes
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-03-04 16:30:16 +07:00
Robin Appelman d81713e5c1
simplify setup of circular SetupManager<->Manager
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-03-04 16:30:09 +07:00
Robin Appelman 6c1d051ecd
add template annotations to CappedMemoryCache
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-03-04 16:30:06 +07: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 +07:00
Robin Appelman 5c0fe93498
move teardown logic to SetupManager
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-03-04 16:29:50 +07: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 +07: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 +07: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 +07:00
Robin Appelman 0217949715
only setup part of the filesystem for appdata requests
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-02-09 16:01:21 +07:00
John Molakvoæ (skjnldsv) 215aef3cbd
Update php licenses
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2021-06-04 22:02:41 +07:00
Christoph Wurst 5bf3d1bb38
Update license headers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-12-05 15:38:45 +07:00
Robin Appelman f7ae235372
cache OC\Files\Mount\Manager::findIn results
Signed-off-by: Robin Appelman <robin@icewind.nl>
2018-08-16 19:02:00 +07:00
Robin Appelman f8116ad4cf
use more efficient method to find mountpoint for path
this changes the complexity from the number of mounts to the depth of
the path

Signed-off-by: Robin Appelman <robin@icewind.nl>
2018-08-16 18:55:52 +07:00
Roeland Jago Douma 73e6eea57e
Fix tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-04-04 12:50:54 +07:00
Roeland Jago Douma 37233471b6
Add pathcache
* If we find the mountpoint for a path cache it
* If we modify the mount points empty the pathCache

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-04-04 12:44:56 +07:00
Roeland Jago Douma dc222aa3a5
Comparing stringlength is cheaper than strpos
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-04-04 12:44:28 +07:00
Roeland Jago Douma e48d4c4aad
Cache the $foundMountPointLength
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-04-04 12:44:28 +07:00
Roeland Jago Douma 003c624596
Inspections
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-04-04 12:44:28 +07:00
Roeland Jago Douma 7f1141f7e9
Make the MountManager strict
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-04-04 12:44:28 +07:00
Joas Schilling 0215b004da
Update with robin 2016-07-21 18:13:58 +07:00
Joas Schilling ba87db3fcc
Fix others 2016-07-21 18:13:57 +07:00
Lukas Reschke aba539703c
Update license headers 2016-05-26 19:57:24 +07:00
Roeland Jago Douma dedf392751
Move \OC\Files to PSR-4 2016-04-24 21:37:35 +07:00