{"record":{"id":"721086dfb8920788","repo":"AlistGo/alist","slug":"failed-to-create-directory-s-w-721086","errorCode":null,"errorMessage":"failed to create directory [%s]: %w","messagePattern":"failed to create directory \\[(.+?)\\]: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"drivers/azure_blob/util.go","lineNumber":302,"sourceCode":"\t\t\titemDstPath := path.Join(dstPath, relPath)\n\n\t\t\tif isDirectory(item) {\n\t\t\t\t// Create directory marker at destination\n\t\t\t\tif err := d.mkDir(ctx, itemDstPath); err != nil {\n\t\t\t\t\treturn fmt.Errorf(\"failed to create directory marker [%s]: %w\", itemDstPath, err)\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Copy file blob to destination\n\t\t\t\tif err := d.copyFile(ctx, srcBlobName, itemDstPath); err != nil {\n\t\t\t\t\treturn fmt.Errorf(\"failed to copy blob [%s]: %w\", srcBlobName, err)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Handle empty directories by creating a marker at destination\n\t\tif len(blobs) == 0 {\n\t\t\tif err := d.mkDir(ctx, dstPath); err != nil {\n\t\t\t\treturn fmt.Errorf(\"failed to create directory [%s]: %w\", dstPath, err)\n\t\t\t}\n\t\t}\n\n\t\t// Delete source directory and its contents\n\t\tif err := d.deleteFolder(ctx, srcPath); err != nil {\n\t\t\tlog.Warnf(\"failed to delete source directory [%s]: %v\\n, and try again\", srcPath, err)\n\t\t\t// Retry deletion once more and ignore the result\n\t\t\tif err := d.deleteFolder(ctx, srcPath); err != nil {\n\t\t\t\tlog.Errorf(\"Retry deletion of source directory [%s] failed: %v\", srcPath, err)\n\t\t\t}\n\t\t}\n\n\t\treturn nil\n\t}\n\n\t// Single file move or rename operation\n\tif err := d.copyFile(ctx, srcPath, dstPath); err != nil {\n\t\treturn fmt.Errorf(\"failed to copy file: %w\", err)","sourceCodeStart":284,"sourceCodeEnd":320,"githubUrl":"https://github.com/AlistGo/alist/blob/843d9dc8149126976b2625911e45a4d3ffd6f2f5/drivers/azure_blob/util.go#L284-L320","documentation":"Error \"failed to create directory [%s]: %w\" thrown in AlistGo/alist.","triggerScenarios":"Thrown at drivers/azure_blob/util.go:302 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the underlying error details in the message, fix the indicated cause (credentials, network, or provider-side failure), and retry."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"843d9dc8149126976b2625911e45a4d3ffd6f2f5","analyzedAt":"2026-08-15T12:14:11.722Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}