diff --git a/lib/private/Files/Node/Folder.php b/lib/private/Files/Node/Folder.php
index b2a98fb307762ee9930f869777f368858f80d6b7..2d1751a53e9bde1998ef625df5d18485880029a0 100644
--- a/lib/private/Files/Node/Folder.php
+++ b/lib/private/Files/Node/Folder.php
@@ -190,6 +190,9 @@ class Folder extends Node implements \OCP\Files\Folder {
 	 * @throws \OCP\Files\NotPermittedException
 	 */
 	public function newFile($path, $content = null) {
+		if (empty($path)) {
+			throw new NotPermittedException('Could not create as provided path is empty');
+		}
 		if ($this->checkPermissions(\OCP\Constants::PERMISSION_CREATE)) {
 			$fullPath = $this->getFullPath($path);
 			$nonExisting = new NonExistingFile($this->root, $this->view, $fullPath);