{"record":{"id":"313c3234057a36c7","repo":"AlistGo/alist","slug":"failed-to-list-blobs-for-deletion-w","errorCode":null,"errorMessage":"failed to list blobs for deletion: %w","messagePattern":"failed to list blobs for deletion: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"drivers/azure_blob/util.go","lineNumber":139,"sourceCode":"\t\t\t\t\tblobName = *resp.BlobName\n\t\t\t\t}\n\t\t\t\treturn fmt.Errorf(\"failed to delete blob %s: %v\", blobName, resp.Error)\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}\n\n// deleteFolder recursively deletes a directory and all its contents\nfunc (d *AzureBlob) deleteFolder(ctx context.Context, prefix string) error {\n\t// Ensure directory path ends with slash\n\tprefix = ensureTrailingSlash(prefix)\n\n\t// Get all blobs under the directory using flattenListBlobs\n\tglobs, err := d.flattenListBlobs(ctx, prefix)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to list blobs for deletion: %w\", err)\n\t}\n\n\t// If there are blobs in the directory, delete them\n\tif len(globs) > 0 {\n\t\t// 分离文件和目录标记\n\t\tvar filePaths []string\n\t\tvar dirPaths []string\n\n\t\tfor _, blob := range globs {\n\t\t\tblobName := *blob.Name\n\t\t\tif isDirectory(blob) {\n\t\t\t\t// remove trailing slash for directory names\n\t\t\t\tdirPaths = append(dirPaths, strings.TrimSuffix(blobName, \"/\"))\n\t\t\t} else {\n\t\t\t\tfilePaths = append(filePaths, blobName)\n\t\t\t}\n\t\t}\n","sourceCodeStart":121,"sourceCodeEnd":157,"githubUrl":"https://github.com/AlistGo/alist/blob/843d9dc8149126976b2625911e45a4d3ffd6f2f5/drivers/azure_blob/util.go#L121-L157","documentation":"Error \"failed to list blobs for deletion: %w\" thrown in AlistGo/alist.","triggerScenarios":"Thrown at drivers/azure_blob/util.go:139 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-15T17:31:12.345Z"}