fix(Folder): Allow filename to be '0'

Signed-off-by: Marcel Klehr <mklehr@gmx.net>
pull/40326/head
Marcel Klehr 2023-10-22 12:22:30 +07:00
parent 6b6ac72fe6
commit 71a06b6bf8
1 changed files with 1 additions and 1 deletions

@ -177,7 +177,7 @@ class Folder extends Node implements \OCP\Files\Folder {
* @throws \OCP\Files\NotPermittedException
*/
public function newFile($path, $content = null) {
if (empty($path)) {
if ($path === '') {
throw new NotPermittedException('Could not create as provided path is empty');
}
if ($this->checkPermissions(\OCP\Constants::PERMISSION_CREATE)) {