Commit graph

1398 commits

Author SHA1 Message Date
hopleus
deeca104f0 Refactoring getName function
Signed-off-by: hopleus <hopleus@gmail.com>
2024-03-14 14:53:43 +00:00
hopleus
591c2cb01a Fixes for getting the file name in the cases when the file name key is received, but it is empty
Signed-off-by: hopleus <hopleus@gmail.com>
2024-03-14 14:53:43 +00:00
Julius Härtl
d718a2adb1 fix: Throw instead of yielding nothing when listing local directories
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2024-02-26 07:45:04 +00:00
Benjamin Gaussorgues
92df765457
Merge pull request #43246 from nextcloud/backport/41327/stable27 2024-02-09 10:31:11 +01:00
Git'Fellow
ef786616ec
Merge pull request #43390 from nextcloud/backport/43131/stable27
[stable27] fix(files): Don't attempt to format a partial cache entry
2024-02-09 10:25:03 +01:00
Robin Appelman
00b9002785 continue background scanning different storages if one fails
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-02-07 09:07:40 +00:00
Christoph Wurst
d4e01fb0a1 fix(files): Don't attempt to format a partial cache entry
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2024-02-06 12:52:45 +00:00
Robin Appelman
7c8d71d0a0 also updated parent etags when a changed etag is detected during scanning
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-01-31 18:28:05 +00:00
Robin Appelman
90c57a6700 dont reuse etag for folders marked explicitly unscanned
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-01-31 18:28:05 +00:00
Git'Fellow
6b496ab164
fix: reduce memory consumption of scans
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>

Fix lint

Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
2024-01-16 09:29:09 +01:00
Julius Härtl
f5fe531665 fix(s3): Add config option to disable multipart copy for certain s3 providers
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2023-12-29 10:48:40 +00:00
Robin Appelman
ad5be4f04b only do a multipart s3 copy when above the regular copy limit
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-12-29 10:48:40 +00:00
Robin Appelman
15bed77a22 setup filesystem wrappers before we mark the root as setup
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-12-05 09:47:03 +01:00
Robin Appelman
fbc0f65711 add more checks to ensure mounts aren't empty
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-12-05 09:47:03 +01:00
Marcel Klehr
76265de3f1 fix(TemplateManager): Bail early if templatedirectory is empty
fixes #39266

Signed-off-by: Marcel Klehr <mklehr@gmx.net>
2023-12-04 10:12:53 +00:00
Arthur Schiwon
52eddf8675
Merge pull request #41462 from nextcloud/backport/40996/stable27
[stable27] reuse sharing disabled state when listing folder content
2023-11-28 11:33:04 +01:00
Robin Appelman
43ef6da11e
optimize UserMountCache::registerStorage
Signed-off-by: Robin Appelman <robin@icewind.nl>
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
2023-11-16 16:40:57 +01:00
Benjamin Gaussorgues
902ba76d30
Merge pull request #41502 from nextcloud/backport/40935/stable27
[stable27] add some support for rename on case insensitive local filesystems
2023-11-16 16:34:12 +01:00
Benjamin Gaussorgues
1af4301997
Merge pull request #41363 from nextcloud/optmize-storage-wrappers-27
[27] optimize builtin storage wrappers
2023-11-16 14:21:56 +01:00
Robin Appelman
482deca354
add some support for rename on case insensitive local filesystems
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-11-15 15:21:14 +01:00
Tobias Zimmerer
8970f96e3b fix(s3): support SSE-C headers for the MultipartCopy call
Signed-off-by: Tobias Zimmerer <3228193+ir0nhide@users.noreply.github.com>
2023-11-15 07:37:09 +00:00
Robin Appelman
0c88d5b303 reuse sharing disabled state when listing folder content
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-11-14 14:28:16 +00:00
Robin Appelman
81d625d44d
optimize isShared and isMounted
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-11-09 15:42:41 +01:00
Robin Appelman
bdba3f1e2f
optimize builtin storage wrappers
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-11-09 15:41:01 +01:00
Robin Appelman
204aedc606 optimize cache jail creation
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-11-07 13:59:32 +00:00
Jonas
9ed1bbee5c enh(IMountManager): Add method to get MountPoint from CachedMountInfo
Signed-off-by: Jonas <jonas@freesources.org>
2023-10-26 22:21:08 +02:00
Arthur Schiwon
a722274c60
Merge pull request #40569 from nextcloud/backport/40499/stable27
[stable27] add wrapper for external storage to ensure we don't get an mtime that is lower than we know it is
2023-10-11 10:06:29 +02:00
Julius Härtl
1f4fffc258
Merge pull request #40577 from nextcloud/s3-multipart-copy-27 2023-10-10 19:22:53 +02:00
Robin Appelman
36eef0be67 add wrapper to ensure we don't get an mtime that is lower than we know it is
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-10-10 09:34:20 +02:00
Côme Chilliet
e0eb9a8ce9 Store size in int|float for 32bit support
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-09-25 15:14:31 +00:00
Robin Appelman
22556a67a8 use multipart copy for s3
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-09-22 10:42:07 +02:00
Arthur Schiwon
21f8cc8847
Merge pull request #40379 from nextcloud/backport/38808/stable27
[stable27] Fix issues where unencrypted_size was being falsely used for non-encrypted home folders
2023-09-21 10:55:43 +02:00
Lucas Azevedo
cfae699d6e Wrap mimetype insert and getLastInsertId in a transaction
Signed-off-by: Lucas Azevedo <lhs_azevedo@hotmail.com>
2023-09-16 19:31:27 +00:00
Lucas Azevedo
f0a1716bb5 fix(mimetype): Remove unnecessary transaction when storing a mime type
Fixes #40064.

This could be fixed by adding a rollback and starting a new transaction
before the SELECT query, but in this case that would have the same
effect as not using one.
See https://dev.mysql.com/doc/refman/8.0/en/innodb-autocommit-commit-rollback.html
and https://www.postgresql.org/docs/7.1/sql-begin.html#R1-SQL-BEGIN-1

Signed-off-by: Lucas Azevedo <lhs_azevedo@hotmail.com>
2023-09-16 19:31:26 +00:00
Julius Härtl
fd6990a33b
fix: Only read unencrypted_size when file is actually encrypted
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2023-09-12 15:05:16 +02:00
Julius Härtl
b14967cb2c
fix: Only store unencrypted_size if path should be encrypted
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2023-09-12 15:05:13 +02:00
Robin Appelman
ee8c1a5c60
only determine quota_include_external_storage once for quota wrapper
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-09-07 16:25:23 +02:00
Robin Appelman
5ebceaa54c
reuse dependencies from wrapped cache
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-09-07 16:22:00 +02:00
Arthur Schiwon
bb08cc15b0
Merge pull request #40286 from nextcloud/backport/40233/stable27
[stable27] Detect aborted connection in OC\Files\View and stop writing data to t…
2023-09-07 11:03:42 +02:00
Arthur Schiwon
801c5556f4
Merge pull request #40231 from nextcloud/sharing-mask-wrapper-27
[27] move share permission logic to storage wrapper
2023-09-06 10:27:55 +02:00
Benjamin Gaussorgues
8c7017679d
Detect aborted connection in OC\Files\View and stop writing data to the output buffer
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
2023-09-06 09:22:06 +02:00
Arthur Schiwon
278f79f932
Merge pull request #40227 from nextcloud/backport/40195/stable27
[stable27] fix: prevent sharing permissions on user root folder
2023-09-05 19:14:24 +02:00
Robin Appelman
fc21ecbd2a
cleanup di for share permissions wrapper
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-09-04 14:13:57 +02:00
Robin Appelman
8511fb91ca
more share permission logic to storage wrapper
this way we only have to determine the share permissions once

Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-09-04 14:09:41 +02:00
John Molakvoæ
d60f95833b fix: prevent sharing permissions on user root folder
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2023-09-04 09:05:11 +00:00
Thomas Citharel
fe618feeb0 fix(s3): fix handling verify_bucket_exists parameter
If 'verify_bucket_exists' is set to false in the config.php s3 configuration, it's supposed to avoid
verifying that the bucket exists. However empty(falsy) will  always return true, so this condition
would not work.

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2023-08-31 21:21:16 +00:00
Anna Larch
818ddb02c5 fix: don't emit Hooks when hookpaths are empty
Signed-off-by: Anna Larch <anna@nextcloud.com>
2023-08-21 09:58:21 +02:00
Ferdinand Thiessen
752523f874 fix: Prevent PHP warnings when optional CacheEntry attributes are unset
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2023-08-17 09:48:53 +00:00
Robin Appelman
a5cd892caa select the fileid first when looking for incomplete files
this seems to improve mariadbs index selection

Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-08-14 18:58:47 +00:00
John Molakvoæ
0638f58632 fix: simplify sourceData check
Co-authored-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
Signed-off-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
2023-08-05 10:34:12 +00:00