{"record":{"id":"58b0f5c8f8b22497","repo":"AlistGo/alist","slug":"failed-to-list-source-directory-contents-w","errorCode":null,"errorMessage":"failed to list source directory contents: %w","messagePattern":"failed to list source directory contents: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"drivers/azure_blob/driver.go","lineNumber":203,"sourceCode":"\t\tModified: time.Now(),\n\t\tIsFolder: srcObj.IsDir(),\n\t\tSize:     srcObj.GetSize(),\n\t}, nil\n}\n\n// Copy duplicates an object (file or directory) to a specified destination directory.\nfunc (d *AzureBlob) Copy(ctx context.Context, srcObj, dstDir model.Obj) (model.Obj, error) {\n\tdstPath := path.Join(dstDir.GetPath(), srcObj.GetName())\n\n\t// Handle directory copying using flat listing\n\tif srcObj.IsDir() {\n\t\tsrcPrefix := srcObj.GetPath()\n\t\tsrcPrefix = ensureTrailingSlash(srcPrefix)\n\n\t\t// Get all blobs under the source directory\n\t\tblobs, err := d.flattenListBlobs(ctx, srcPrefix)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"failed to list source directory contents: %w\", err)\n\t\t}\n\n\t\t// Process each blob - copy to destination\n\t\tfor _, blob := range blobs {\n\t\t\t// Skip the directory marker itself\n\t\t\tif *blob.Name == srcPrefix {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\t// Calculate relative path from source\n\t\t\trelPath := strings.TrimPrefix(*blob.Name, srcPrefix)\n\t\t\titemDstPath := path.Join(dstPath, relPath)\n\n\t\t\tif strings.HasSuffix(itemDstPath, \"/\") || (blob.Metadata[\"hdi_isfolder\"] != nil && *blob.Metadata[\"hdi_isfolder\"] == \"true\") {\n\t\t\t\t// Create directory marker at destination\n\t\t\t\terr := d.mkDir(ctx, itemDstPath)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, fmt.Errorf(\"failed to create directory marker [%s]: %w\", itemDstPath, err)","sourceCodeStart":185,"sourceCodeEnd":221,"githubUrl":"https://github.com/AlistGo/alist/blob/843d9dc8149126976b2625911e45a4d3ffd6f2f5/drivers/azure_blob/driver.go#L185-L221","documentation":"Error \"failed to list source directory contents: %w\" thrown in AlistGo/alist.","triggerScenarios":"Thrown at drivers/azure_blob/driver.go:203 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"}