this removes the need for temporary storages with some external storage backends.
The new method is added to a separate interface to maintain compatibility with
storage backends implementing the storage interface directly (without inheriting common)
Currently the interface is implemented for objectstorage based storages and local storage
and used by webdav uploads
Signed-off-by: Robin Appelman <robin@icewind.nl>
* found while adding the strict_typing for PHP 7+ migration
* first argument is a boolean - second one is the path
* see http://php.net/manual/en/function.clearstatcache.php
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
If we have a jailed storage we must also fix the internal path on copy.
Else we pass in the wrong path.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* remove obsolete hack
> // file_get_contents() has a memory leak: https://bugs.php.net/bug.php?id=61961
was closed 4 years ago. we could also use the Common implementation
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
In some cross-local-storage use cases, the Local storage is
instantiated with "/" as data directory. In such cases, calling
realpath() would cause PHP warnings when open_basedir is set.
This fix bypasses the realpath() call when dealing with a root storage.
Downstreaming of https://github.com/owncloud/core/pull/26058
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>