[stable32] Quota wrapper fixes#60130
Conversation
Signed-off-by: Robin Appelman <robin@icewind.nl>
Signed-off-by: Robin Appelman <robin@icewind.nl>
Signed-off-by: Robin Appelman <robin@icewind.nl>
69a04c5 to
05bea18
Compare
| // todo: storage or getWrapperStorage() ? | ||
| $source = $this->getWrapperStorage()->fopen($path, $mode); |
There was a problem hiding this comment.
all other places use storage, not sure if getWrapperStorage() should be used here from the PR in the master branch
There was a problem hiding this comment.
Only if it's an instance of \OC\Files\Storage\Wrapper\Wrapper - is it?
There was a problem hiding this comment.
not sure I understand.
the typeof $this->storage is \OC\Files\Storage\Storage it seems from the Wrapper class.
looking again at the original PR of this backport and public function getWrapperStorage(), it seems this function is the way to go, it does a falsy validation but returns the same $this->storage at the end.
wdyt?
There was a problem hiding this comment.
If §this-storage is ensured to be an instance of \OC\Files\Storage\Storage, you can use the getWrapperStorage function.
There was a problem hiding this comment.
getWrapperStorage() sometimes returns FailedStorage which throws StorageNotAvailableException but not quite sure if this exception is handled properly downstream.
pushed the change with getWrapperStorage used still.
|
cherry-picked the commits from the original PR with some fixes, hopefully it looks good. It seems to work in this context at least: #59989 |
| // todo: storage or getWrapperStorage() ? | ||
| $source = $this->getWrapperStorage()->fopen($path, $mode); |
There was a problem hiding this comment.
Only if it's an instance of \OC\Files\Storage\Wrapper\Wrapper - is it?
Signed-off-by: kyteinsky <kyteinsky@gmail.com>
Backport of #59995
Warning, This backport's changes differ from the original and might be incomplete⚠️
Todo
Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.