{"record":{"id":"76f0f6ad915e6745","repo":"nextcloud/server","slug":"failed-to-rename-this-path-to-newp","errorCode":null,"errorMessage":"'Failed to rename ' . $this->path . ' to ' . $newPath","messagePattern":"'Failed to rename ' \\. \\$this->path \\. ' to ' \\. \\$newPath","errorType":"exception","errorClass":"Sabre\\DAV\\Exception","httpStatus":500,"severity":"error","filePath":"apps/dav/lib/Connector/Sabre/Node.php","lineNumber":151,"sourceCode":"\t * @throws LockedException\n\t */\n\t#[\\Override]\n\tpublic function setName($name): void {\n\t\tif (!$this->canRename()) {\n\t\t\tthrow new Forbidden('');\n\t\t}\n\n\t\t/** @var string $parentPath */\n\t\t[$parentPath,] = \\Sabre\\Uri\\split($this->path);\n\t\t/** @var string $newName */\n\t\t[, $newName] = \\Sabre\\Uri\\split($name);\n\t\t$newPath = $parentPath . '/' . $newName;\n\n\t\t// verify path of the target\n\t\t$this->verifyPath($newPath);\n\n\t\tif ($this->fileView->rename($this->path, $newPath) === false) {\n\t\t\tthrow new Exception('Failed to rename ' . $this->path . ' to ' . $newPath);\n\t\t}\n\n\t\t$this->path = $newPath;\n\n\t\t$this->refreshInfo();\n\t}\n\n\t/**\n\t * Returns the last modification time, as a unix timestamp\n\t *\n\t * @return int timestamp as integer\n\t */\n\t#[\\Override]\n\tpublic function getLastModified(): int {\n\t\treturn $this->info->getMtime();\n\t}\n\n\t/**","sourceCodeStart":133,"sourceCodeEnd":169,"githubUrl":"https://github.com/nextcloud/server/blob/ecdeb153ffdf227235c9a7e2d13dbe0f9c817bc3/apps/dav/lib/Connector/Sabre/Node.php#L133-L169","documentation":"Error \"'Failed to rename ' . $this->path . ' to ' . $newPath\" thrown in nextcloud/server.","triggerScenarios":"Thrown at apps/dav/lib/Connector/Sabre/Node.php:151 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"}