Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Commit 847aef1

Browse files
committed
common: Ensure the number of bytes written is passed back to the caller
1 parent 0421d54 commit 847aef1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

common/util.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -907,7 +907,7 @@ func DownloadDatabase(w http.ResponseWriter, r *http.Request, dbOwner, dbFolder,
907907
w.Header().Set("Content-Disposition", fmt.Sprintf(`attachment; filename="%s"`, dbName))
908908
w.Header().Set("Content-Length", fmt.Sprintf("%d", stat.Size))
909909
w.Header().Set("Content-Type", "application/x-sqlite3")
910-
_, err = io.Copy(w, userDB)
910+
bytesWritten, err = io.Copy(w, userDB)
911911
if err != nil {
912912
log.Printf("Error returning DB file: %v\n", err)
913913
return

0 commit comments

Comments
 (0)