{"record":{"id":"f77c1f1c29199c92","repo":"AlistGo/alist","slug":"failed-to-download-source-file-w","errorCode":null,"errorMessage":"failed to download source file: %w","messagePattern":"failed to download source file: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"drivers/proton_drive/driver.go","lineNumber":321,"sourceCode":"\t\treturn nil, fmt.Errorf(\"protonDrive bridge is nil\")\n\t}\n\n\treturn d.DirectRename(ctx, srcObj, newName)\n}\n\nfunc (d *ProtonDrive) Copy(ctx context.Context, srcObj, dstDir model.Obj) (model.Obj, error) {\n\tif srcObj.IsDir() {\n\t\treturn nil, fmt.Errorf(\"directory copy not supported\")\n\t}\n\n\tsrcLink, err := d.searchByPath(ctx, srcObj.GetPath(), false)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treader, linkSize, fileSystemAttrs, err := d.protonDrive.DownloadFile(ctx, srcLink, 0)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to download source file: %w\", err)\n\t}\n\tdefer reader.Close()\n\n\tactualSize := linkSize\n\tif fileSystemAttrs != nil && fileSystemAttrs.Size > 0 {\n\t\tactualSize = fileSystemAttrs.Size\n\t}\n\n\ttempFile, err := utils.CreateTempFile(reader, actualSize)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to create temp file: %w\", err)\n\t}\n\tdefer tempFile.Close()\n\n\tupdatedObj := &model.Object{\n\t\tName: srcObj.GetName(),\n\t\t// Use the accurate and real size\n\t\tSize:     actualSize,","sourceCodeStart":303,"sourceCodeEnd":339,"githubUrl":"https://github.com/AlistGo/alist/blob/843d9dc8149126976b2625911e45a4d3ffd6f2f5/drivers/proton_drive/driver.go#L303-L339","documentation":"Error \"failed to download source file: %w\" thrown in AlistGo/alist.","triggerScenarios":"Thrown at drivers/proton_drive/driver.go:321 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"}