Commit Graph

527 Commits

Author SHA1 Message Date
Arthur Schiwon 009c2dfbd5
take return of mkdir into account, throw exception on failure
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2019-04-29 16:45:59 +02:00
Roeland Jago Douma dedb84acb0
Always use a temp file for swift writes
Apparently the if statement doesn't work in all cases (even if I could
not reproduce it). So for the time being we will just not directly
stream to swift.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-04-18 21:04:27 +02:00
Roeland Jago Douma 5d360bd16f
Harden appdata putcontent
If for whatever reason appdata got into a strange state this will at
least propegate up and not make it do boom the next run.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-04-08 13:22:00 +02:00
Vlastimil Pecinka 1c3abda280
Store user object later in the code
Signed-off-by: Vlastimil Pecinka <pecinka@email.cz>
2019-03-21 21:57:47 +01:00
Robin Appelman cc29f5d719
always allow moving mountpoints inside the same mountpoint
even if that mountpoint isn't normally a valid target for moving mounts into

Signed-off-by: Robin Appelman <robin@icewind.nl>
2019-03-19 15:56:18 +01:00
Roeland Jago Douma 6f88f28a15
Merge pull request #14689 from nextcloud/rename-moveable-mount-readonly-parent
allow renaming the root of a movable mount even if the parent folder …
2019-03-15 16:48:34 +01:00
Joas Schilling 17d5e47937
Remove spaming debug logs
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-03-15 12:13:44 +01:00
Robin Appelman 3ca1e90044
allow renaming the root of a movable mount even if the parent folder is readonly
Signed-off-by: Robin Appelman <robin@icewind.nl>
2019-03-14 15:27:25 +01:00
Robin Appelman 631ae17dce
handle long etags from dav external storage
we can only store etags up to 40 characters long in the database, so when we get an etag that's longer we simply hash it to bring down the length

Signed-off-by: Robin Appelman <robin@icewind.nl>
2019-03-14 14:46:39 +01:00
Morris Jobke 772303309d
Merge pull request #14425 from cowai/fix-multiple-incomplete-folders
Do not calculate folder size for parent that also needs proper scan, fixes #3524
2019-03-08 09:12:33 +01:00
Roeland Jago Douma 1b27e9578d
Merge pull request #14424 from nextcloud/fix/13554/swift_to_tmp
Use a tmp file for swift writes
2019-03-06 15:33:15 +01:00
Ari Selseng d16cfb519e Avoid calculating folder size for parent that needs scan.
Signed-off-by: Ari Selseng <ari@selseng.net>
2019-03-06 15:23:37 +01:00
Morris Jobke debd32b461
Merge pull request #14175 from skydiablo/master
Fix ObjectStorage expired token (v3)
2019-03-05 18:59:45 +01:00
Roeland Jago Douma 1153123b90
Use a tmp file for swift writes
Else this leads to a seekable stream error with chunked uploads

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-03-04 13:11:59 +01:00
Julius Härtl c778032276
Properly handle null as ownerId if file system access is denied by access token
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2019-03-01 20:57:01 +01:00
Joas Schilling 01b4db62fb
Add dispatcher events to User and Group objects
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-03-01 20:56:59 +01:00
Roeland Jago Douma df55781814
Merge pull request #14254 from sparrowjack63/master
Dont check Bucket Name in Nextcloud
2019-03-01 13:46:04 +01:00
S. Cat e3142a91b2 Bucket name - Alert in debug mode
Alert in debug mode only when trying to mount non compatible DNS bucket name (in order to not flood the logs)

Signed-off-by: Sébastien Cat <sebastien.cat@inra.fr>
2019-03-01 11:28:54 +01:00
S. Cat 381ae44d38 Correct code indent
Just correct code indent.

Signed-off-by: Sébastien Cat <sebastien.cat@inra.fr>
2019-03-01 11:28:54 +01:00
S. Cat 77473b0228 Warning on S3 not compatible DNS bucket name
The new created bucket should respect the DNS compatibility, nevertheless, Nextcloud should accept to mount "old created" buckets that does not respect DNS compatibility (Backward compatibility, or compatibility with CEPH).

Signed-off-by: Sébastien Cat <sebastien.cat@inra.fr>
2019-03-01 11:28:54 +01:00
Sebastien Cat 59c3d8d85f Dont check Bucket Name in Nextcloud
Signed-off-by: Sebastien Cat <sparrow.jack63@gmail.com>
Signed-off-by: Sébastien Cat <sebastien.cat@inra.fr>
2019-03-01 11:28:54 +01:00
Robin Appelman 8fc47c6f00
add option to get raw size (without submounts) from fileinfo
Signed-off-by: Robin Appelman <robin@icewind.nl>
2019-02-27 15:35:44 +01:00
Morris Jobke 50d7f87eab
Merge pull request #14269 from nextcloud/cache-update-event
add event for cache update
2019-02-19 11:07:59 +01:00
Robin Appelman 092f78d7a4
add event for cache update
Signed-off-by: Robin Appelman <robin@icewind.nl>
2019-02-18 16:50:41 +01:00
Roeland Jago Douma f6f002e2ad
Merge pull request #14210 from nextcloud/fix/14192/fix_empty_uploads
Fix empty file uploads to S3 (and other streaming storages)
2019-02-18 15:39:17 +01:00
Roeland Jago Douma 104616c1da
Use CountWrapper instead of almost identical CountReadStream
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-02-15 13:24:58 +01:00
Roeland Jago Douma 61d66d7954
Fix empty file uploads to S3
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-02-15 08:41:39 +01:00
Roeland Jago Douma 62ddb124a1
Filter out versions and trashbin
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-02-13 21:27:25 +01:00
Roeland Jago Douma cb67c6aa00
Loop for the recent search
Else it might happen that less entries than requested are returned

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-02-13 21:22:16 +01:00
Roeland Jago Douma 4c7424d38b
We need to initialize the storage else the jailed path is always null
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-02-13 21:01:17 +01:00
Volker d06c25b9c8
Update SwiftFactory.php
Auth-Service (in explizit v3) will recheck the cached-token and will end in an "token expired exception".
2019-02-13 12:26:27 +01:00
Morris Jobke baa6a2d52c
Merge pull request #13748 from nextcloud/cache-insert-event
add event for inserting cache entries
2019-02-07 16:35:02 +01:00
Robin Appelman 748bcd407b
add event for inserting cache entries
this provides a reliable way for apps to listen to new files
without the need to of cache wrappers to hook into inserts themselves
(something which isn't 100% reliable)

Signed-off-by: Robin Appelman <robin@icewind.nl>
2019-02-07 15:51:30 +01:00
William Pain c26bdd4731 Fix: Check if `$this->params['user']` is an array
Signed-off-by: William Pain <pain.william@gmail.com>
2019-02-05 09:56:42 +01:00
Robin Appelman 1d322d3b37
always use multipart uploader for s3 uploads
the multipart uploader handles non seekable streams while `upload` does not

Signed-off-by: Robin Appelman <robin@icewind.nl>
2019-01-28 14:51:19 +01:00
Morris Jobke 90e985fe4f
Merge pull request #13739 from nextcloud/cache-cleanup-change
cleanup shared lock if changing to exclusive lock failed
2019-01-22 16:11:46 +01:00
Robin Appelman f69c2d1e84
cleanup shared lock if changing to exclusive lock failed
Signed-off-by: Robin Appelman <robin@icewind.nl>
2019-01-22 15:32:48 +01:00
Morris Jobke c3b22f05bb
Merge pull request #13468 from rummatee/issue13276
don't close input stream when writing in encrypted file
2019-01-14 16:21:08 +01:00
Morris Jobke 5a27e54f4b
Merge pull request #13032 from nextcloud/objectstore-write-exists
upload new files in objectstore to a .part path first
2019-01-14 11:26:29 +01:00
Robin Appelman 615fb8cd77
Cache tokens when using swift's v2 authentication
Signed-off-by: Robin Appelman <robin@icewind.nl>
2019-01-13 19:59:48 +01:00
Florian Schunk c2f8df0573 don't close input stream when writing in encrypted file
Signed-off-by: Florian Schunk <florian.schunk@rwth-aachen.de>
2019-01-10 00:25:07 +01:00
Roeland Jago Douma d0956c9a42
Followup 12833, gracefully handle the getting of /
Else this breaks the app page

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-12-21 11:08:19 +01:00
Joas Schilling 6788e6e75c
Merge pull request #12883 from nextcloud/appdata-performance
try to grab the appdata folder directly without going trough the whole tree
2018-12-17 15:11:28 +01:00
Robin Appelman d6bf5d4384
upload new files in objectstore to a .part path first
This prevent the object store and cache from getting out of sync
when an objectstore silently fails or the php process get's killed
during the upload without giving us the chance to cleanup

Signed-off-by: Robin Appelman <robin@icewind.nl>
2018-12-12 15:24:40 +01:00
Robin Appelman 6c9f2644cf
Add objectExists to objectstore interface
Signed-off-by: Robin Appelman <robin@icewind.nl>
2018-12-12 14:17:19 +01:00
Robin Appelman 740ea0d30e
try to grab the appdata folder directly without going trough the whole tree
Signed-off-by: Robin Appelman <robin@icewind.nl>
2018-12-06 15:10:08 +01:00
Morris Jobke 60681decdd
Merge pull request #12865 from nextcloud/fix/do_not_propogate_in_appdata
No need to propogate changes in appdata
2018-12-06 08:50:22 +01:00
Morris Jobke ecc8068e66
Merge pull request #12857 from nextcloud/fix/emit_write_update_once_on_touch
Emit write update only once on touch
2018-12-05 22:54:47 +01:00
Roeland Jago Douma 72f3882d4b
No need to propogate changes in appdata
Right now we propogate a lof of changes in appdata. So for example we
propogate each and every preview that is added to the system. This has
no real added value as far as I can tell.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-12-05 22:06:19 +01:00
Roeland Jago Douma 2c6d36105c
Emit write update only once on touch
When a touch is done (i.e. when creating a new file in the node API)
The hooks contain 'write' and 'touch' (and the operation is touch as
well). This would cause a double write update. Which doesn't make sense.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-12-05 21:29:48 +01:00