Commit Graph

1170 Commits (54b6d0708bcf389857fdc7e0afe8f0edcf8ea3f3)

Author SHA1 Message Date
raul 95bc770a37 Fix unencrypted size calculation for files created before the Encryption storage is enabled
Signed-off-by: raul <raul@nextcloud.com>
2022-10-03 13:44:14 +07:00
raul 45a1ebcc4c Fix: Prevent deadlocks during mtime/size/etag propagation
Signed-off-by: raul <raul@nextcloud.com>
2022-10-03 13:44:14 +07:00
blizzz ca958de7e9
Merge pull request #33566 from nextcloud/fopen-not-found-rescan
trigger a rescan when trying to fopen a file that exists in cache but not on disk
2022-10-01 21:47:26 +07:00
blizzz f323c5b854
Merge pull request #34269 from nextcloud/td/noid/remove-unused-listener
remove listeners to OC_Filesystem::(write|rename) old style hooks
2022-10-01 16:15:39 +07:00
Carl Schwan 92a5a8f075 Cleanup tags and Share component
- Port to LoggerInterface
- Use IDBConnection and IQueryBuilder instead of raw SQL and OC_DB
- Use IEventListener instead of hooks
- Remove the now unused OC_DB and OC_DB_StatementWrapper legacy utils

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-09-29 15:15:28 +07:00
Robin Appelman cb51564356 trigger a rescan when trying to fopen a file that exists in cache but not on disk
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-09-29 11:17:16 +07:00
Arthur Schiwon 9b7ef2962e
remove listeners to OC_Filesystem::(write|rename) old style hooks
- the events are not emitted anymore
- OC_Filesystem::isBlacklisted() is not called from anywhere else

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2022-09-26 21:07:08 +07:00
Carl Schwan 3950deb42f
Merge pull request #32740 from jasperweyne/patch-2
Fix open_basedir issues by AWS SDK
2022-09-19 10:19:15 +07:00
Vincent Petry 1025d049c7
Merge pull request #24596 from kofemann/dcache-worm
make NextCloud WORM file system friendly
2022-09-16 14:39:13 +07:00
Vincent Petry b3ca186d2d
Merge pull request #34020 from nextcloud/logical-op
Switch logical operators (and|or)
2022-09-16 13:35:19 +07:00
Tigran Mkrtchyan f41209a061 config: add a switch to control truncate before update
To avoid extra truncate on non WORM file systems, add a new config
option `localstorage.unlink_on_truncate`, which defaults to false.

The OC\Files\Storage\Local is update to respect that option.

Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
2022-09-16 11:10:32 +07:00
Tigran Mkrtchyan 8fc4cf67f1 files: remove destination file before copying new content (WORM)
Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
2022-09-16 10:57:17 +07:00
Robin Appelman d8961ed10f
fix using FSEEK_END with SeekableHttpStream to get file size
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-09-15 17:23:16 +07:00
Git'Fellow 5300f0d693
Switch logical operators (and|or)
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
2022-09-12 09:35:12 +07:00
Carl Schwan eac54c4660
Merge pull request #33788 from nextcloud/improve-recent
Improve getting recent files performance
2022-09-08 16:19:41 +07:00
blizzz 417f46e467
Merge pull request #33600 from nextcloud/lazy-quota
get quota for user only when needed
2022-09-07 18:10:33 +07:00
Carl Schwan 67551f379f
Filter out old files when trying to get recent files
Only do so when asking for less than 100 files and having an offset
equal to 0.

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-09-05 12:53:32 +07:00
Robin Appelman 9f5f970957
handle errors from hash_final
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-09-02 12:27:13 +07:00
Robin Appelman bd91c56539
get quota for user only when needed
always apply the wrapper but have the wrapper get the quota lazily only when an operation where quota is applied is performed

Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-09-01 19:32:24 +07:00
Robin Appelman a9575a7029
handle cases where the hash context gets cleaned up before the hash wrapper
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-08-31 15:05:10 +07:00
Robin Appelman e9ba58ca61
remove leading slash for search results at mountpoint root
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-08-29 17:33:43 +07:00
Tigran Mkrtchyan b6065a236f files: make OC\Files\Storage\Local WORM friendly
Some filesystems run as a Write-Once-Read-Many storages. This
makes them impossible to use with NexeCloud, as the file system
layers uses `truncate` syscall (through file_put_contents function).

As Nextcloud is never updates existing files, removing the old entry
and creatint a new one on update will allow NextCoud to update on such
file systems.

Update Local#fopen and Local#file_put_contents to remote existing
file before truncating.

Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
2022-08-25 11:11:49 +07:00
Julius Härtl 83b1415906
Only pass parent if paths match
As the user folder might be initialized by the root from two levels
down the hierarchy, passing this as a parent only works if the path matches

Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-08-24 22:20:32 +07:00
Julius Härtl b2d6435737
Avoid extra query for the parent node if we can pass it along
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-08-24 22:20:32 +07:00
Robin Appelman b6f8b8da60 directly build the search filter for shared storage instead of setting up the source cache
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-08-17 11:58:57 +07:00
Vincent Petry 312b719acf
Merge pull request #32943 from nextcloud/unencrypted-size-revert-interface-changes
Revert interface changes from "store unencrypted size in the unencrypted_size column"
2022-08-17 11:36:16 +07:00
Vincent Petry 11d5a1d3df
Merge pull request #33550 from nextcloud/jail-search-post
optimize search post-processing for jail wrapper
2022-08-17 10:55:41 +07:00
Vincent Petry 2360d880fa
Merge pull request #33540 from nextcloud/mount-provider-migration
fix updating cached mounts that didn't have their mount provider set previously
2022-08-17 10:41:31 +07:00
Vincent Petry 082432e01c
Merge pull request #33551 from nextcloud/scanner-dont-update-same-size
don't update the folder size if we know it hasn't changed
2022-08-17 09:21:30 +07:00
Julius Härtl 999dced07c
Merge pull request #33559 from yeyulantu/bugfix-search-cache 2022-08-16 23:54:59 +07:00
Robin Appelman 457822c144 don't update the folder size if we know it hasn't changed
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-08-16 13:56:51 +07:00
Robin Appelman de63f6363f fix updating size when folder is empty
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-08-16 13:54:26 +07:00
Robin Appelman 1374cbee3e store unencrypted size in the unencrypted_size column
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-08-16 13:54:26 +07:00
Robin Appelman 10767d7779 fix updating cached mounts that didn't have their mount provider set previously
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-08-16 13:47:41 +07:00
Robin Appelman 9d6c2ce301 optimize search post-processing for jail wrapper
don't both asking the wrapped cache if we know it's not in our jail anyway

Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-08-16 13:36:52 +07:00
Robin Appelman 5e375d9092 Revert "store unencrypted size in the unencrypted_size column"
This reverts commit 8238582e59.

Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-08-16 12:07:14 +07:00
David fe3f4afd77
fixed the cache searchBuilder negative map
Signed-off-by: David <37280718+yeyulantu@users.noreply.github.com>
2022-08-16 17:59:02 +07:00
Carl Schwan 51b9847fad
Merge branch 'master' into display-name-cache-public
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-08-15 15:28:30 +07:00
Jasper Weyne 44f6c931e7
Merge branch 'master' into patch-2 2022-08-11 08:54:08 +07:00
Côme Chilliet 7ae6791737
Document all getIncomplete implementations as returning string|false
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-08-02 14:23:14 +07:00
Côme Chilliet cb271b759e
Fix dynamic property creations in test files
This fixes warnings in PHP 8.2

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-08-01 15:07:53 +07:00
Côme Chilliet 472f4cad47
Merge pull request #33380 from luzpaz/fix/lib-private-typos
Fix typos in lib/private subdirectory
2022-07-28 09:17:48 +07:00
luz paz 368f83095d Fix typos in lib/private subdirectory
Found via `codespell -q 3 -S l10n -L jus ./lib/private`

Signed-off-by: luz paz <luzpaz@github.com>
2022-07-27 08:52:17 +07:00
Robin Appelman 61fdd91dcf
don't set `null` as a bundle path
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-07-27 12:58:07 +07:00
Robin Appelman 13eef55a92
always triger setup of builtin storage wrappers
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-07-21 16:36:32 +07:00
Carl Schwan 6c3c7a5e4d
Merge pull request #32981 from nextcloud/typing/carl/simplefs
Add typing to SimpleFS
2022-07-18 12:34:11 +07:00
Carl Schwan f6b37e6912
Merge pull request #33064 from nextcloud/feat/capped-memorycache-ocp
Move CappedMemoryCache to OCP
2022-07-18 10:32:11 +07:00
Daniel 52dc51cde3
Merge pull request #32963 from nextcloud/s3-crt-bundle-download
also use nextcloud certificate bundle when downloading from s3
2022-07-18 09:51:19 +07:00
Carl Schwan 19a36b58a6 Add typing to SimpleFS
- Fix putContent sometimes return a bool and sometimes nothing

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-07-14 17:20:51 +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