{"record":{"id":"a6109ece92b66cb0","repo":"nextcloud/server","slug":"insufficient-space-in-normalizedpath-cannot-crea","errorCode":null,"errorMessage":"Insufficient space in $normalizedPath. Cannot create directory","messagePattern":"Insufficient space in \\$normalizedPath\\. Cannot create directory","errorType":"exception","errorClass":"Sabre\\DAV\\Exception\\InsufficientStorage","httpStatus":507,"severity":"error","filePath":"apps/dav/lib/Connector/Sabre/QuotaPlugin.php","lineNumber":264,"sourceCode":"\t\t}\n\t\tif (empty($length)) {\n\t\t\treturn true; // No length to check, assume okay\n\t\t}\n\n\t\t$normalizedPath = str_replace('//', '/', $path);\n\t\t$freeSpace = $this->getFreeSpace($normalizedPath);\n\n\t\t// Explicitly handle unknown/invalid free space\n\t\tif ($freeSpace === false || $freeSpace < 0) {\n\t\t\t// You might log here; currently allows the operation\n\t\t\treturn true;\n\t\t}\n\n\t\tif ($length > $freeSpace) {\n\t\t\t$msg = $isDir\n\t\t\t\t? \"Insufficient space in $normalizedPath. Cannot create directory\"\n\t\t\t\t: \"Insufficient space in $normalizedPath\";\n\t\t\tthrow new InsufficientStorage($msg);\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Returns the largest valid content length found in any of the following HTTP headers:\n\t * - X-Expected-Entity-Length\n\t * - Content-Length\n\t * - OC-Total-Length\n\t *\n\t * Only numeric values are considered. If none of the headers contain a valid numeric value,\n\t * returns null.\n\t *\n\t * @internal\n\t * @return int|float|null The largest valid content length, or null if none is found.\n\t */\n\tpublic function getLength(): int|float|null {","sourceCodeStart":246,"sourceCodeEnd":282,"githubUrl":"https://github.com/nextcloud/server/blob/ecdeb153ffdf227235c9a7e2d13dbe0f9c817bc3/apps/dav/lib/Connector/Sabre/QuotaPlugin.php#L246-L282","documentation":"Error \"Insufficient space in $normalizedPath. Cannot create directory\" thrown in nextcloud/server.","triggerScenarios":"Thrown at apps/dav/lib/Connector/Sabre/QuotaPlugin.php:264 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"ecdeb153ffdf227235c9a7e2d13dbe0f9c817bc3","analyzedAt":"2026-08-17T01:36:13.386Z","schemaVersion":2},"datasetVersion":"2026-08-17T04:17:16.089Z"}