{"record":{"id":"5ce751331f54bddd","repo":"AlistGo/alist","slug":"failed-to-create-temp-file-w","errorCode":null,"errorMessage":"failed to create temp file: %w","messagePattern":"failed to create temp file: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"drivers/proton_drive/driver.go","lineNumber":332,"sourceCode":"\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,\n\t\tModified: srcObj.ModTime(),\n\t\tIsFolder: false,\n\t}\n\n\treturn d.Put(ctx, dstDir, &fileStreamer{\n\t\tReadCloser: tempFile,\n\t\tobj:        updatedObj,\n\t}, nil)\n}\n\nfunc (d *ProtonDrive) Remove(ctx context.Context, obj model.Obj) error {","sourceCodeStart":314,"sourceCodeEnd":350,"githubUrl":"https://github.com/AlistGo/alist/blob/843d9dc8149126976b2625911e45a4d3ffd6f2f5/drivers/proton_drive/driver.go#L314-L350","documentation":"Error \"failed to create temp file: %w\" thrown in AlistGo/alist.","triggerScenarios":"Thrown at drivers/proton_drive/driver.go:332 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"}