summaryrefslogtreecommitdiffstats
path: root/lib/private/Files
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #36075 from fmenabe/s3-storage-classCôme Chilliet2023-01-162-1/+7
|\ | | | | Add support for s3 storage classes
| * Manage s3 storage class in objectstoreFrançois Ménabé2023-01-122-1/+7
| | | | | | | | Signed-off-by: François Ménabé <francois.menabe@gmail.com>
* | Switch logical operatorsGit'Fellow2023-01-111-18/+11
|/ | | Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
* Suppress last psalm error until upstream fix is released and includedCôme Chilliet2023-01-021-0/+1
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Fix psalm spotted errors with new requirementsCôme Chilliet2023-01-021-1/+1
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Merge pull request #34724 from nextcloud/encryption-read-before-cacheVincent Petry2022-12-201-4/+16
|\ | | | | fix reading newly written encrypted files before their cache entry is written
| * clear is-encrypted cache when trying to fix encrypted versionRobin Appelman2022-12-011-0/+4
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
| * fix reading newly written encrypted files before their cache entry is writtenRobin Appelman2022-11-301-4/+12
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | Merge pull request #34924 from nextcloud/cache-jail-path-prefixVincent Petry2022-12-163-7/+8
|\ \ | | | | | | escape path prefix when doing cache jail search
| * | escape path prefix when doing cache jail searchRobin Appelman2022-11-023-7/+8
| | | | | | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | | Also update the unencrypted size of files when creating them with empty contentJulius Härtl2022-12-071-0/+1
| | | | | | | | | | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* | | Update the unencrypted file size when closing streamsJulius Härtl2022-12-071-1/+1
| | | | | | | | | | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* | | Merge pull request #35576 from ↵Simon L2022-12-061-0/+4
|\ \ \ | | | | | | | | | | | | | | | | nextcloud/handle-possible-null-value-in-new-simple-file Handle possible null value for file in OC\Files\SimpleFS\NewSimpleFile
| * | | Handle possible null value for file in OC\Files\SimpleFS\NewSimpleFileThomas Citharel2022-12-031-0/+4
| | |/ | |/| | | | | | | Signed-off-by: Thomas Citharel <tcit@tcit.fr>
* / | compare cached filesize on downloadMaxence Lange2022-12-013-4/+25
|/ / | | | | Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
* | Fix Executing a query: SQLSTATE[42000]Andy Xheli2022-11-291-1/+1
| | | | | | | | | | | | | | 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>
* | Update cache when file size === 0Louis Chemineau2022-11-231-3/+3
| | | | | | | | | | | | | | | | 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>
* | delay updating setup providers untill we register the mountsRobin Appelman2022-11-171-10/+16
| | | | | | | | | | | | 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>
* | Merge pull request #34994 from Glandos/fileinfo_perfSimon L2022-11-111-3/+3
|\ \ | | | | | | [Performance] Test valid path only if file info has to be retrieved
| * | Test valid path only if file info has to be retrievedGlandos2022-11-061-3/+3
| | | | | | | | | | | | Signed-off-by: Glandos <bugs-github@antipoul.fr>
* | | Make sure that path is normalized and then checked,Côme Chilliet2022-11-101-7/+8
|/ / | | | | | | | | | | and not the other way around Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | fix psalmszaimen2022-11-021-1/+1
| | | | | | | | Signed-off-by: szaimen <szaimen@e.mail.de>
* | remove 32-bit workaroundsszaimen2022-11-021-13/+0
| | | | | | | | Signed-off-by: szaimen <szaimen@e.mail.de>
* | allow disabling object store write checkRobin Appelman2022-10-261-1/+7
|/ | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Merge pull request #34579 from nextcloud/unencrypted-size-nullVincent Petry2022-10-211-1/+1
|\ | | | | fix null error in getUnencryptedSize
| * fix null error in getUnencryptedSizeRobin Appelman2022-10-131-1/+1
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | Merge pull request #34624 from nextcloud/fix/files_external_psalmCarl Schwan2022-10-2014-196/+195
|\ \ | | | | | | Multiple fix for files external
| * | Rename file1 and file2 to source and target in Storage abstractionCarl Schwan2022-10-1814-196/+195
| | | | | | | | | | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* | | Fix various other small psalm issuesCarl Schwan2022-10-171-1/+1
|/ / | | | | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* / Scope the appdata theming storage for global and usersJohn Molakvoæ2022-10-141-0/+15
|/ | | | Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
* Avoid allocating too much memory for the bufferJulius Härtl2022-10-111-1/+1
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Fix unencrypted size calculation for files created before the Encryption ↵raul2022-10-031-1/+1
| | | | | | storage is enabled Signed-off-by: raul <raul@nextcloud.com>
* Fix: Prevent deadlocks during mtime/size/etag propagationraul2022-10-031-17/+29
| | | | Signed-off-by: raul <raul@nextcloud.com>
* Merge pull request #33566 from nextcloud/fopen-not-found-rescanblizzz2022-10-012-2/+19
|\ | | | | trigger a rescan when trying to fopen a file that exists in cache but not on disk
| * trigger a rescan when trying to fopen a file that exists in cache but not on ↵Robin Appelman2022-09-292-2/+19
| | | | | | | | | | | | disk Signed-off-by: Robin Appelman <robin@icewind.nl>
* | Merge pull request #34269 from nextcloud/td/noid/remove-unused-listenerblizzz2022-10-011-19/+0
|\ \ | | | | | | remove listeners to OC_Filesystem::(write|rename) old style hooks
| * | remove listeners to OC_Filesystem::(write|rename) old style hooksArthur Schiwon2022-09-261-19/+0
| |/ | | | | | | | | | | | | - the events are not emitted anymore - OC_Filesystem::isBlacklisted() is not called from anywhere else Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* / Cleanup tags and Share componentCarl Schwan2022-09-291-2/+4
|/ | | | | | | | | - 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>
* Merge pull request #32740 from jasperweyne/patch-2Carl Schwan2022-09-191-0/+2
|\ | | | | Fix open_basedir issues by AWS SDK
| * Merge branch 'master' into patch-2Jasper Weyne2022-08-1130-177/+279
| |\
| * | Disable ~/.aws/config access by S3ConnectionTraitJasper Weyne2022-06-071-0/+2
| | | | | | | | | | | | | | | This commit sets the 'use_aws_shared_config_files' option to false, in order to disable configuration loading from ~/.aws/config by the AWS SDK, specifically the S3Client. It is a continuation of #27040, as that PR only changed the behaviour of the CredentialsProvider; this change affects the ConfigurationProvider as well. Signed-off-by: Jasper Weyne <jasperweyne@gmail.com>
* | | Merge pull request #24596 from kofemann/dcache-wormVincent Petry2022-09-161-0/+14
|\ \ \ | | | | | | | | make NextCloud WORM file system friendly
| * | | config: add a switch to control truncate before updateTigran Mkrtchyan2022-09-161-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | files: remove destination file before copying new content (WORM)Tigran Mkrtchyan2022-09-161-0/+2
| | | | | | | | | | | | | | | | Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
| * | | files: make OC\Files\Storage\Local WORM friendlyTigran Mkrtchyan2022-08-251-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | Merge pull request #34020 from nextcloud/logical-opVincent Petry2022-09-161-18/+12
|\ \ \ \ | | | | | | | | | | Switch logical operators (and|or)
| * | | | Switch logical operators (and|or)Git'Fellow2022-09-121-18/+12
| | | | | | | | | | | | | | | Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
* | | | | fix using FSEEK_END with SeekableHttpStream to get file sizeRobin Appelman2022-09-151-21/+60
|/ / / / | | | | | | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | | | Merge pull request #33788 from nextcloud/improve-recentCarl Schwan2022-09-081-27/+55
|\ \ \ \ | | | | | | | | | | Improve getting recent files performance
| * | | | Filter out old files when trying to get recent filesCarl Schwan2022-09-051-27/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>