aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMarcel Klehr <mklehr@gmx.net>2023-10-22 12:22:30 +0200
committerMarcel Klehr <mklehr@gmx.net>2023-10-22 12:22:30 +0200
commit71a06b6bf803b325a7b440be7d0c7d691fb05a04 (patch)
treeb9195e76fa43a2dcc0c373b0c8c9115615d91240 /lib
parent6b6ac72fe63659bcf5643f2d3b888105bc64f106 (diff)
downloadnextcloud-server-71a06b6bf803b325a7b440be7d0c7d691fb05a04.tar.gz
nextcloud-server-71a06b6bf803b325a7b440be7d0c7d691fb05a04.zip
fix(Folder): Allow filename to be '0'
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Files/Node/Folder.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/Files/Node/Folder.php b/lib/private/Files/Node/Folder.php
index ccd10da9d0c..c7462572fed 100644
--- a/lib/private/Files/Node/Folder.php
+++ b/lib/private/Files/Node/Folder.php
@@ -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)) {