{"record":{"id":"f59371b2b2aa7690","repo":"Budibase/budibase","slug":"path-cannot-be-created-err-message","errorCode":null,"errorMessage":"Path cannot be created: ${err.message}","messagePattern":"Path cannot be created: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/server/src/utilities/fileSystem/filesystem.ts","lineNumber":107,"sourceCode":"    relativePath === \"..\" ||\n    relativePath.startsWith(`..${sep}`) ||\n    isAbsolute(relativePath)\n  ) {\n    throw new Error(\"Path must be within the Budibase temp directory.\")\n  }\n\n  return resolvedPath\n}\n\nexport const createTempFolder = (item: string) => {\n  const path = fs.mkdtempSync(\n    join(budibaseTempDir(), `${sanitizeTempFolderPrefix(item)}-`)\n  )\n  try {\n    return assertWithinTempDir(path)\n  } catch (err: any) {\n    fs.rmSync(path, { recursive: true, force: true })\n    throw new Error(`Path cannot be created: ${err.message}`)\n  }\n}\n\nexport const extractTarball = async (fromFilePath: string, toPath: string) => {\n  const safePath = assertWithinTempDir(toPath)\n  await tar.extract({\n    file: fromFilePath,\n    C: safePath,\n  })\n}\n\n/**\n * Find for a file recursively from start path applying filter, return first match\n */\nexport const findFileRec = (\n  startPath: PathLike,\n  filter: string\n): string | undefined => {","sourceCodeStart":89,"sourceCodeEnd":125,"githubUrl":"https://github.com/Budibase/budibase/blob/a81a902e9a8fe55b467d106765f6638f12e35c49/packages/server/src/utilities/fileSystem/filesystem.ts#L89-L125","documentation":"Error \"Path cannot be created: ${err.message}\" thrown in Budibase/budibase.","triggerScenarios":"Thrown at packages/server/src/utilities/fileSystem/filesystem.ts:107 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":"a81a902e9a8fe55b467d106765f6638f12e35c49","analyzedAt":"2026-08-29T01:03:10.972Z","schemaVersion":2},"datasetVersion":"2026-08-29T02:17:18.158Z"}