Fixes#20235
By using an UploadFile we make sure that we don't need to have another
check everywhere for the path. But we just have ot check (which we have
to anyway) if it is a proper Connector/File (or directory).
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
To continue this formatting madness, here's a tiny patch that adds
unified formatting for control structures like if and loops as well as
classes, their methods and anonymous functions. This basically forces
the constructs to start on the same line. This is not exactly what PSR2
wants, but I think we can have a few exceptions with "our" style. The
starting of braces on the same line is pracrically standard for our
code.
This also removes and empty lines from method/function bodies at the
beginning and end.
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Order the imports
* No leading slash on imports
* Empty line before namespace
* One line per import
* Empty after imports
* Emmpty line at bottom of file
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This will make it possible to act propely on moves of future files if we
need to know the size (like for max size virus scanning).
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Avoids errors when the size exceeds MAX_INT because of the cast to int. Better cast it to float to avoid this.
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
The files home node must also return DAV properties like etag,
permissions, etc for the clients to work like they did with the old
endpoint.
This fix makes FilesHome extend the Sabre Directory class, this makes
the FilesPlugin and other plugins recognize it as a directory and will
retrieve the matching properties when applicable.
Downstream of https://github.com/owncloud/core/pull/26066
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>