Christoph Wurst
b8c61b3515
fix(caching): Avoid checking existence before fetching
...
The cache might expire between checking for key existence and fetching
the value. In this rare case the code continues with a null value when
it doesn't expect one.
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2023-06-12 09:44:48 +07:00
Robin Appelman
60cf0c8f5f
add command for getting fileinfo for debugging
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-04-17 16:23:52 +07:00
Robin Appelman
c105b6a85d
still include the share target in the cache key for validating share mount
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-01-16 13:09:50 +07:00
Robin Appelman
927174e325
fix cache key used to verify shared mountpoints
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-01-09 13:48:44 +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
Carl Schwan
ec6b83cc18
Add stricter psalm type for CappedMemoryCache
...
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-05-12 15:06:18 +07:00
Robin Appelman
bda8601648
cache the verification of the share mountpoint
...
after the initial verification this can only really be invalidated by a system mount (external/group/etc) being created at the share target since any normal file/folder creation will already conflict with the share
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-04-21 18:08:35 +07:00
Robin Appelman
db2418be85
invalidate mount cache after share rename
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-03-24 17:36:56 +07: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 +07:00
Hinrich Mahler
961f8958c0
Let users choose a share_folder
2021-09-06 16:39:11 +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
d89a75be0b
Update all license headers for Nextcloud 21
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-12-16 18:48:22 +07:00
Christoph Wurst
2a054e6c04
Update the license headers for Nextcloud 20
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-08-24 14:54:25 +07:00
Daniel Kesselberg
6f8147b18f
Fix some MissingDocblockType or InvalidDocblock warnings.
...
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2020-08-14 15:10:48 +07:00
Christoph Wurst
caff1023ea
Format control structures, classes, methods and function
...
To continue this formatting madness, here's a tiny patch that adds
unified formatting for control structures like if and loops as well as
classes, their methods and anonymous functions. This basically forces
the constructs to start on the same line. This is not exactly what PSR2
wants, but I think we can have a few exceptions with "our" style. The
starting of braces on the same line is pracrically standard for our
code.
This also removes and empty lines from method/function bodies at the
beginning and end.
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 14:19:56 +07:00
Joas Schilling
841f2f3b04
Allow to overwrite share target mountpoints
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-02-17 09:04:19 +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
67f3d6f0a6
cache parent exists status during share setup
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2018-08-16 21:28:01 +07:00
Robin Appelman
b5217b6f63
don't check if target dir exists when using the default share target directory
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2018-08-16 21:27:51 +07:00
Robin Appelman
b79f338e71
re-use view instances for shared storages
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2018-08-16 21:27:48 +07:00
Robin Appelman
bc4f10ad83
more efficient way to detect added and removed mounts
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2018-08-16 21:27:45 +07:00
Robin Appelman
3155c1bd9a
more efficient unique share target generation
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2018-08-16 19:54:42 +07:00
Morris Jobke
dd34cb7540
Less deprecated calls to OCP\Util::writeLog
...
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-04-22 20:41:49 +07:00
Morris Jobke
a661f043e1
Remove unneeded semicolon and parentheses
...
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-01-26 23:46:40 +07:00
Morris Jobke
0eebff152a
Update license headers
...
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-11-06 16:56:19 +07:00
Robin Appelman
ab9a36e872
allow apps to set custom mount types
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-04-28 09:38:21 +07:00
Frédéric Fortier
cc511ac7b8
Typecast filecache 'storage' as int to return it as documented, fixes #3461
...
Signed-off-by: Frédéric Fortier <frederic.fortier@oronospolytechnique.com>
2017-02-20 22:23:27 +07:00
Roeland Jago Douma
9e353f6289
Fix overwriting parameter
...
Fixes #2641
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-12-13 22:28:09 +07:00
Robin Appelman
bbe24d29ca
reuse cacheentry
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2016-12-13 12:30:29 +07:00
Joas Schilling
246bb9f33d
Move OC\Files\Storage\Shared to the right namespace
2016-10-20 20:27:44 +07:00
Vincent Petry
423378ea17
Added closeCursor in SharedMount numeric id
2016-08-30 19:49:31 +07:00
Vincent Petry
669b0bc2ae
Prevent error with orphaned shares when updating user mount cache
2016-08-30 19:49:23 +07:00
Robin Appelman
95570d607c
reuse existing root id
2016-08-22 12:27:20 +07:00
Robin Appelman
a999420c75
get shared storage storage id without setting up the storage
2016-08-09 15:52:13 +07:00
Roeland Jago Douma
04d5465228
Group shares with same source and target
...
Fixes #24575
Note that this is a very limited solution and eventually we want smarter
merging!
2016-08-03 10:16:28 +07:00
Joas Schilling
0215b004da
Update with robin
2016-07-21 18:13:58 +07:00
Joas Schilling
813f0a0f40
Fix apps/
2016-07-21 18:13:57 +07:00
Vincent Petry
a636078e6c
Make getShareFolder use given view instead of static FS
2016-06-17 11:11:59 +07:00
Lukas Reschke
aba539703c
Update license headers
2016-05-26 19:57:24 +07:00
Joas Schilling
3a716ae91c
Move lib/ to PSR-4
2016-05-25 14:59:59 +07:00