Maxence Lange
cc639a8877
compare cached filesize on download
...
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
2022-12-01 15:42:15 -01:00
Andy Xheli
e69c7c4d26
Fix Executing a query: SQLSTATE[42000]
...
Signed-off-by: Andy Xheli <axheli@axtsolutions.com>
Fix https://github.com/nextcloud/server/issues/32007#issuecomment-1329405245
Signed-off-by: Andy Xheli <axheli@axtsolutions.com>
2022-11-29 11:24:56 -06:00
Louis Chemineau
66ba90ceff
Update cache when file size === 0
...
The conditions were false when $result === 0.
$results here contains the number of written bits.
The correct way of checking for operation success is to check if $result === false
Signed-off-by: Louis Chemineau <louis@chmn.me>
2022-11-23 12:43:57 +01:00
Robin Appelman
841a6a084e
delay updating setup providers untill we register the mounts
...
otherwise the fallback to a full setup for a missing cached mount provider will lead to a race condition
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-11-17 15:21:57 +01:00
Simon L
9d45845d2a
Merge pull request #34994 from Glandos/fileinfo_perf
...
[Performance] Test valid path only if file info has to be retrieved
2022-11-11 17:11:21 +01:00
Côme Chilliet
a78595a45f
Make sure that path is normalized and then checked,
...
and not the other way around
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-11-10 15:03:15 +01:00
Glandos
48ca33761f
Test valid path only if file info has to be retrieved
...
Signed-off-by: Glandos <bugs-github@antipoul.fr>
2022-11-06 19:23:53 +01:00
szaimen
3f7c620f26
fix psalm
...
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-11-02 11:13:34 +01:00
szaimen
dd8774389e
remove 32-bit workarounds
...
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-11-02 11:13:34 +01:00
Robin Appelman
a5036a973c
allow disabling object store write check
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-10-26 18:45:59 +00:00
Vincent Petry
4aa8e80511
Merge pull request #34579 from nextcloud/unencrypted-size-null
...
fix null error in getUnencryptedSize
2022-10-21 16:53:43 +02:00
Carl Schwan
0f0f132959
Merge pull request #34624 from nextcloud/fix/files_external_psalm
...
Multiple fix for files external
2022-10-20 16:53:43 +02:00
Carl Schwan
a5ea677370
Rename file1 and file2 to source and target in Storage abstraction
...
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-10-18 17:21:47 +02:00
Carl Schwan
54031e370a
Fix various other small psalm issues
...
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-10-17 12:40:35 +02:00
John Molakvoæ
e4ff84d468
Scope the appdata theming storage for global and users
...
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2022-10-14 16:18:37 +02:00
Robin Appelman
63316fc572
fix null error in getUnencryptedSize
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-10-13 15:34:48 +02:00
Julius Härtl
214a50d071
Avoid allocating too much memory for the buffer
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-10-11 15:34:27 +02:00
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 +02:00
raul
45a1ebcc4c
Fix: Prevent deadlocks during mtime/size/etag propagation
...
Signed-off-by: raul <raul@nextcloud.com>
2022-10-03 13:44:14 +02: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 +02: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 +02: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 +00: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 +02: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 +02: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 +02:00
Vincent Petry
1025d049c7
Merge pull request #24596 from kofemann/dcache-worm
...
make NextCloud WORM file system friendly
2022-09-16 14:39:13 +02:00
Vincent Petry
b3ca186d2d
Merge pull request #34020 from nextcloud/logical-op
...
Switch logical operators (and|or)
2022-09-16 13:35:19 +02: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 +02: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 +02: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 +02: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 +02:00
Carl Schwan
eac54c4660
Merge pull request #33788 from nextcloud/improve-recent
...
Improve getting recent files performance
2022-09-08 16:19:41 +02:00
blizzz
417f46e467
Merge pull request #33600 from nextcloud/lazy-quota
...
get quota for user only when needed
2022-09-07 18:10:33 +02: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 +02:00
Robin Appelman
9f5f970957
handle errors from hash_final
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-09-02 12:27:13 +02: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 +02: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 +02: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 +02: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 +02: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 +02: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 +02: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 +02: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 +02: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 +02: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 +02: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 +02:00
Julius Härtl
999dced07c
Merge pull request #33559 from yeyulantu/bugfix-search-cache
2022-08-16 23:54:59 +02: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 +02: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 +02: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 +02:00